AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

keystrokes playing too fast
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
buckwheat
Guest





PostPosted: Thu Aug 21, 2008 4:00 pm    Post subject: keystrokes playing too fast Reply with quote

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





PostPosted: Thu Aug 21, 2008 4:11 pm    Post subject: Reply with quote

Quote:
are being sent too fast for the application
Which one?
Back to top
buchwheat
Guest





PostPosted: Thu Aug 21, 2008 4:28 pm    Post subject: keystrokes playing too fast Reply with quote

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

PostPosted: Thu Aug 21, 2008 6:40 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
buckwheat
Guest





PostPosted: Thu Aug 21, 2008 9:25 pm    Post subject: keystrokes playing too fast Reply with quote

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

PostPosted: Thu Aug 21, 2008 9:29 pm    Post subject: Reply with quote

Were you using SendPlay? If you were, then add "Play" to the end of the KeyDelay.

Code:
SetKeyDelay, 10, 10, Play
Back to top
View user's profile Send private message MSN Messenger
buckwheat
Guest





PostPosted: Thu Aug 21, 2008 9:38 pm    Post subject: keystrokes playing too fast Reply with quote

Thanks for your effort Sivvy, but I still get the same result Sad

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

PostPosted: Fri Aug 22, 2008 2:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
buckwheat
Guest





PostPosted: Fri Aug 22, 2008 4:10 pm    Post subject: keystrokes playing too fast Reply with quote

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

PostPosted: Fri Aug 22, 2008 4:27 pm    Post subject: Reply with quote

Code:
SetKeyDelay, 10, 10, Play
!D:: ; Alt+D hotkey
SendPlay, setenv DISPLAY machine1.aaa.bbb.ccc:1{Enter}
return
Back to top
View user's profile Send private message MSN Messenger
buckwheat
Guest





PostPosted: Fri Aug 22, 2008 7:28 pm    Post subject: keystrokes playing too fast Reply with quote

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

PostPosted: Fri Aug 22, 2008 7:37 pm    Post subject: Reply with quote

Code:
Variable1 = setenv DISPLAY
Variable2 = machine1.aaa.bbb.ccc:1

!D:: ; Alt+D hotkey
SendInput, %Variable1% %Variable2%{Enter}
return
Back to top
View user's profile Send private message MSN Messenger
buckwheat
Guest





PostPosted: Fri Aug 22, 2008 8:14 pm    Post subject: keystrokes playing too fast Reply with quote

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

PostPosted: Fri Aug 22, 2008 8:23 pm    Post subject: Reply with quote

Thats odd... Is your computer under a huge load? Lots of programs running?
Back to top
View user's profile Send private message MSN Messenger
buckwheat
Guest





PostPosted: Fri Aug 22, 2008 8:34 pm    Post subject: keystrokes playing too fast Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group