-
February 26th, 2012, 10:20 PM
#1
sendkeys
Hi everyone.
I have some questions for you.
I am working on my application which save work from another application using sendkeys:
SendKeys.Send("^(s)")
SendKeys.Send("file")
SendKeys.SendWait("{ENTER}")
And it works fine,but my problem is that I don't know why sometimes name of the saved file is "file" and sometimes "ile" and sometimes "e".
Why??
-
February 26th, 2012, 10:47 PM
#2
Re: sendkeys
Probably due to the speed at which the keys are sent.
Always use [code][/code] tags when posting code.
-
February 27th, 2012, 02:37 AM
#3
Re: sendkeys
Is there a way to reduce that speed or not??
-
February 27th, 2012, 02:56 AM
#4
Re: sendkeys
You can use the thread sleep function..
Code:
System.Threading.Thread.Sleep(500)
Thread will hold for 500ms before continuing..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
February 27th, 2012, 09:19 AM
#5
Re: sendkeys
I think there's an optional "wait" parameter you can try.
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
|