Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: SendKeys "+{right}" problem

Geek News

SendKeys "+{right}" problem
malgoro 12/9/2008 10:52:02 PM
Hello to all. I have the following script (Access 2003) for the click event
on a button in a form; it takes me to another application from where I need
to copy (screen scraping?) certain pieces of info and paste them into fields
in a table in my application:

Private Sub Command0_Click()

Dim i, a
Dim nw As Date

SendKeys "%{TAB}", True
SendKeys "smagl", True
SendKeys "{enter}", True

nw = DateAdd("s", 3, Now())
While DateDiff("s", Now(), nw) > 1
i = i
Wend

SendKeys "UserName", True
SendKeys "{tab}", True
SendKeys "PASSWORD", True
SendKeys "{enter}", True

nw = DateAdd("s", 2, Now())
While DateDiff("s", Now(), nw) > 1
i = i
Wend

SendKeys "10"
SendKeys "{enter}", True
SendKeys "kf76", True
SendKeys "{enter}", True

nw = DateAdd("s", 5, Now())
While DateDiff("s", Now(), nw) > 1
i = i
Wend

SendKeys "{left 10}", True

'-------------- 'til this point everything is fine, but when i try to select
(highlight) the info i need to copy, it doesn't work:

SendKeys "+{right}", True
SendKeys "+{right}", True
SendKeys "+{right}", True
SendKeys "+{right}", True
SendKeys "+{right}", True

'---------I also tried

sendkeys "+({right 5})" ' without success :( how can I make that shift
key to work?


HELP PLEASE !!!


Re: SendKeys "+{right}" problem
Mark Grizzle <mgrizzle[ at ]oeh.com> 12/10/2008 1:20:39 AM
What about the sendkeys equivalent for control S (select all?)


On 12/9/08 5:52 PM, in article
A9271279-DA15-44C0-8A1E-F4AABF4976B3[ at ]microsoft.com, "malgoro"
<malgoro[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
> Hello to all. I have the following script (Access 2003) for the click event
> on a button in a form; it takes me to another application from where I need
> to copy (screen scraping?) certain pieces of info and paste them into fields
> in a table in my application:
>
> Private Sub Command0_Click()
>
> Dim i, a
> Dim nw As Date
>
> SendKeys "%{TAB}", True
> SendKeys "smagl", True
> SendKeys "{enter}", True
>
> nw = DateAdd("s", 3, Now())
> While DateDiff("s", Now(), nw) > 1
> i = i
> Wend
>
> SendKeys "UserName", True
> SendKeys "{tab}", True
> SendKeys "PASSWORD", True
> SendKeys "{enter}", True
>
> nw = DateAdd("s", 2, Now())
> While DateDiff("s", Now(), nw) > 1
> i = i
> Wend
>
> SendKeys "10"
> SendKeys "{enter}", True
> SendKeys "kf76", True
> SendKeys "{enter}", True
>
> nw = DateAdd("s", 5, Now())
> While DateDiff("s", Now(), nw) > 1
> i = i
> Wend
>
> SendKeys "{left 10}", True
>
> '-------------- 'til this point everything is fine, but when i try to select
> (highlight) the info i need to copy, it doesn't work:
>
> SendKeys "+{right}", True
> SendKeys "+{right}", True
> SendKeys "+{right}", True
> SendKeys "+{right}", True
> SendKeys "+{right}", True
>
> '---------I also tried
>
> sendkeys "+({right 5})" ' without success :( how can I make that shift
> key to work?
>
>
> HELP PLEASE !!!
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net