|
-
Jul 24th, 2011, 12:58 PM
#1
Thread Starter
New Member
SendKeys Problem VB6
What is wrong with SendKeys?
Most of the times, it executes the code as desired... but 30% times, it does not execute the code properly... I tried increasing priority of my program upto 'Realtime'... It increases it's efficiency a little bit... But, how can I make it work perfectly? It is a computer and it ought to do things as we desire... the code I'm using is...
.........................................
Clipboard.Clear
Clipboard.SetText Acc32
SendKeys "(^v)"
DoEvents
SendKeys "({TAB})", True
DoEvents
Clipboard.Clear
Clipboard.SetText Pas32
SendKeys "(^v)"
DoEvents
SendKeys "({ENTER})", True
DoEvents
.........................................
Suppose Acc32 is "[email protected]" and Pas32 is "TempPass", then the output varies as:
[email protected]Pass [Enter] ---- Missed the tab key
[email protected] [Tab] v [Enter] ---- Missed the control key
[email protected] [Tab] TempPass ---- Missed the Enter key
xyzTempPass [Enter] ---- Super-Weird
[email protected] [Tab] TempPass [Enter] ---- Desired
What should I do? Any help will be appreciated... Thank You
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
|