-
January 20th, 2012, 06:23 PM
#1
Pause Between SendKeys
I have this inside a timer:
tmrRFR.Interval = 3000
Line2.Text = "testing"
SendKeys.Send(Line2.Text)
SendKeys.Send("{ENTER}")
-------------------------------------------------NEED A PAUSE HERE
Line3.Text = "woot"
SendKeys.Send(Line3.Text)
SendKeys.Send("{ENTER}")
tmrRFR.Enabled = False
How can I put a pause in the code after the first line of text is sent? It's been awhile since I have dealt with pausing so any help would be appreciated.
-
January 20th, 2012, 07:33 PM
#2
Re: Pause Between SendKeys
Sleep command might be what you are looking for. 1000 = 1 second
-
January 20th, 2012, 08:12 PM
#3
Re: Pause Between SendKeys
I tried using Threading.Thread.Sleep(3000), but the program hangs up quite a bit and then just sends all the input at once anyway.
-
January 20th, 2012, 09:31 PM
#4
Re: Pause Between SendKeys
Threading.Sleep? Sounds like you are using VB.Net instead of VB6.
There are several ways you can do this but without knowing what you are trying to do and what langauge you are using it is difficult to say. You may want to use a string array and call your send keys function from a timer which could send the next string from your array with each call.
Always use [code][/code] tags when posting code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|