| View previous topic :: View next topic |
| Author |
Message |
buckwheat Guest
|
Posted: Thu Aug 21, 2008 4:00 pm Post subject: keystrokes playing too fast |
|
|
How can I slow down the keystrokes that are sent to the screen? An example script sequence is as follows:
!D:: ; Alt+D hotkey
Send setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return
When I press Alt+D the resulting string sometimes plays out well, other times is gets scrambled. It seems like the keystrokes are being sent too fast for the application to keep up.
Any help would be greatly appreciated.
Thanks. |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Thu Aug 21, 2008 4:11 pm Post subject: |
|
|
| Quote: | | are being sent too fast for the application | Which one? |
|
| Back to top |
|
 |
buchwheat Guest
|
Posted: Thu Aug 21, 2008 4:28 pm Post subject: keystrokes playing too fast |
|
|
When I press Alt+D, the output on my window is supposed to look like:
setenv DISPLAY machine1.aaa.bbb.ccc:1
But occasionally, it will come out looking like any of the following (with various random combinations):
setenv DISPLAY maheine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaabbb..ccc:1
setenv DISPLAY machine1.aaab.bb.ccc:1
setenv DSPILAY machine1.aaa.bbb.ccc:1
etc
If I press Alt+D 5 times in a row, I may get 5 different results. |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Thu Aug 21, 2008 6:40 pm Post subject: |
|
|
| Code: | | SetKeyDelay, 10, 10 |
At the top of your "too fast" section. Or top of script if you want the whole script a little slower. |
|
| Back to top |
|
 |
buckwheat Guest
|
Posted: Thu Aug 21, 2008 9:25 pm Post subject: keystrokes playing too fast |
|
|
I get the same results with your recommendation. Even with the following extreme value, it still produces the same result. I'm wondering if this works for the 'Send' command (?).
!D:: ; Alt+D hotkey
SetKeyDelay, 100000000, 1000000
Send setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return[/list] |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Thu Aug 21, 2008 9:29 pm Post subject: |
|
|
Were you using SendPlay? If you were, then add "Play" to the end of the KeyDelay.
| Code: | | SetKeyDelay, 10, 10, Play |
|
|
| Back to top |
|
 |
buckwheat Guest
|
Posted: Thu Aug 21, 2008 9:38 pm Post subject: keystrokes playing too fast |
|
|
Thanks for your effort Sivvy, but I still get the same result
My current script is:
!D:: ; Alt+D hotkey
SetKeyDelay, 10, 10, Play
Send setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return |
|
| Back to top |
|
 |
Slanter
Joined: 28 May 2008 Posts: 397 Location: Minnesota, USA
|
Posted: Fri Aug 22, 2008 2:17 am Post subject: |
|
|
Try | Code: | !D:: ; Alt+D hotkey
SendInput setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return |
_________________ Unless otherwise stated, all code is untested
(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination. |
|
| Back to top |
|
 |
buckwheat Guest
|
Posted: Fri Aug 22, 2008 4:10 pm Post subject: keystrokes playing too fast |
|
|
Thanks Slanter, but no luck. I tried:
!D:: ; Alt+D hotkey
SendInput setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return
But I still get scrambled letters on about 30% of the time.
Any other ideas? |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Fri Aug 22, 2008 4:27 pm Post subject: |
|
|
| Code: | SetKeyDelay, 10, 10, Play
!D:: ; Alt+D hotkey
SendPlay, setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return |
|
|
| Back to top |
|
 |
buckwheat Guest
|
Posted: Fri Aug 22, 2008 7:28 pm Post subject: keystrokes playing too fast |
|
|
I tried it:
SetKeyDelay, 10, 10, Play
!D:: ; Alt+D hotkey
SendPlay, setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return
But I still get the following erroneous errors after entering Alt+D several times:
seetnv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1..aaa.bbbccc:1
setenv DISPLAaY mchine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAaY mchine1..aaabbb.ccc:1 |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Fri Aug 22, 2008 7:37 pm Post subject: |
|
|
| Code: | Variable1 = setenv DISPLAY
Variable2 = machine1.aaa.bbb.ccc:1
!D:: ; Alt+D hotkey
SendInput, %Variable1% %Variable2%{Enter}
return |
|
|
| Back to top |
|
 |
buckwheat Guest
|
Posted: Fri Aug 22, 2008 8:14 pm Post subject: keystrokes playing too fast |
|
|
Tried:
Variable1 = setenv DISPLAY
Variable2 = machine1.aaa.bbb.ccc:1
!D:: ; Alt+D hotkey
SendInput, %Variable1% %Variable2%{Enter}
return
But nothing played out at all when I entered Alt+D
I then tried:
!D:: ; Alt+D hotkey
Variable1 = setenv DISPLAY
Variable2 = machine1.aaa.bbb.ccc:1
SendInput, %Variable1% %Variable2%{Enter}
return
But this yielded the same results as before:
seetnv DISPLAYmaachine1..aa.bbbccc:1
setenv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAaY mchine1..aaa.bbbccc:1
seetnv DISPLAY machine1.aaa.bbb.ccc:1
setenv DISPLAaY mchine11..aaa.bbbccc:
seetnv DISPLAaY mchine1.aaa.bbb.ccc:1
seetnv DISPLAY machine1..aaabbb.ccc:1
seetnv DISPLAY machine1.aaa.bbb.ccc:1
Still hoping..... |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Fri Aug 22, 2008 8:23 pm Post subject: |
|
|
| Thats odd... Is your computer under a huge load? Lots of programs running? |
|
| Back to top |
|
 |
buckwheat Guest
|
Posted: Fri Aug 22, 2008 8:34 pm Post subject: keystrokes playing too fast |
|
|
| Nope; my machine is as idle as can be. This AHK key sequence used to work perfectly when I had two 21" Dell LCD monitors (running out of my DELL Latitude 610 with Windows XP). I have recently upgraded to two 24" Dell LCD monitors. Even when using the same resolution as before (as with the 21" monitors), I still get the scrambled character results. It must have something to do with the rate at which the monitors can accept the keystrokes, hence I thought that slowing down the keystrokes from AHK would help. I really rely on AHK due to repetitive stress injuries; AHK saves my hands big time. Please let me know if you need any other information. I would "really" let to get this resolved. |
|
| Back to top |
|
 |
|