I have a minor problem with a script using WaitKeyDown. The ESCAPE key is recognized but only if I hold the key down long enough to activate the character repeat. It might be missing characters or it might be a timing problem. The keyboard is part of a Dell wireless desktop running MS XP Home.
e.g.
LClick
WaitWindowOpen>Command Prompt (3)
MoveWindow>Command Prompt (3),722,39
.
.
.
Send>b
WaitKeyDown>VK27
send>n
The program running in the Command window is an old DOS application and all other Macro Scheduler 9.2 key functions work as expected with it. Has anyone else noticed unexpected results when using WaitKeyDown?
WaitKeyDown Problem
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Your script may have a tight or intensive loop in it, or maybe waiting for some other event to take place, thus delaying detection of the keystroke. If you post your full script we may be able to help you optimise it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 6
- Joined: Sun Nov 18, 2007 8:23 pm
Full Script:
// C:\Program Files\MJT Net Ltd\Macro Scheduler\Frac.scp
// Recorded on Wednesday, November 15, 2006, at 09:10 AM
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
MouseMove>265,1181
Wait>1.0
LClick
WaitWindowOpen>Command Prompt (3)
MoveWindow>Command Prompt (3),722,39
ResizeWindow>Command Prompt (3),833,993
Wait>1.00
Send>f
Wait>0.5
Press Enter
Wait>1.5
Send>2
Wait>0.5
Press Enter
Wait>1.00
Send>5
Wait>0.50
Press Enter
Wait>1.0
Send>b
WaitKeyDown>VK27
send>n
//Press Enter
Wait>0.10
Send>n
Wait>0.20
//Press Enter
Wait>0.10
Send>n
Wait>0.20
//Press Enter
Wait>0.10
Send>n
Wait>0.20
Press Enter
Wait>0.10
Press Enter
Wait>0.10
Press Enter
Wait>0.10
Send>e
Wait>0.20
Send>x
Wait>0.20
Send>i
Wait>0.20
Send>t
Wait>0.20
Press Enter
// C:\Program Files\MJT Net Ltd\Macro Scheduler\Frac.scp
// Recorded on Wednesday, November 15, 2006, at 09:10 AM
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
MouseMove>265,1181
Wait>1.0
LClick
WaitWindowOpen>Command Prompt (3)
MoveWindow>Command Prompt (3),722,39
ResizeWindow>Command Prompt (3),833,993
Wait>1.00
Send>f
Wait>0.5
Press Enter
Wait>1.5
Send>2
Wait>0.5
Press Enter
Wait>1.00
Send>5
Wait>0.50
Press Enter
Wait>1.0
Send>b
WaitKeyDown>VK27
send>n
//Press Enter
Wait>0.10
Send>n
Wait>0.20
//Press Enter
Wait>0.10
Send>n
Wait>0.20
//Press Enter
Wait>0.10
Send>n
Wait>0.20
Press Enter
Wait>0.10
Press Enter
Wait>0.10
Press Enter
Wait>0.10
Send>e
Wait>0.20
Send>x
Wait>0.20
Send>i
Wait>0.20
Send>t
Wait>0.20
Press Enter
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The only reason I can see for a delay here is if you are pressing Escape before the script has got to the WaitKeyDown line. Once the script is at that line there should be no delay because there is no other wait.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 6
- Joined: Sun Nov 18, 2007 8:23 pm
Right. No Delay and several minutes between Send>b and
WaitKeyDown>VK27. Has anyone else used WaitKeyDown with wireless keyboard drivers? In an XP Command Prompt environment with a running program?
I have noticed I can tap quickly on the ESCAPE key and the running program will react but not always Macro Scheduler. It seems to need a longer keypress.
WaitKeyDown>VK27. Has anyone else used WaitKeyDown with wireless keyboard drivers? In an XP Command Prompt environment with a running program?
I have noticed I can tap quickly on the ESCAPE key and the running program will react but not always Macro Scheduler. It seems to need a longer keypress.
-
- Newbie
- Posts: 6
- Joined: Sun Nov 18, 2007 8:23 pm