Nihilum Posted October 24, 2007 Share Posted October 24, 2007 I'm searching for a easy script that: Sleep 10s and then: Shift key pressing every 100ms (SendKeyDelay= 100), and pressed for 10ms (SendKeyDownDelay=10). It ends when I Press ESC. I'm asking for it because I can't make HotKeySet to work -.- I know I'm very newbie. Thanks in advance Link to comment Share on other sites More sharing options...
Nihilum Posted October 24, 2007 Author Share Posted October 24, 2007 Shift key pressing every 100ms (SendKeyDelay= 100), and pressed for 10ms (SendKeyDownDelay=10). It ends when I Press ESC. I'm asking for it because I can't make HotKeySet to work with ESC and another question:HotKeySet ("{ESC}", "MyExit")Do Opt ("SendKeyDelay", 1000) Opt ("SendKeyDownDelay", 500) Send ("+", 1)until what i have to write here if i want it to be repeated until I press ESC?Func MyExit() Exit EndFuncThanks in advanceCannot edit Link to comment Share on other sites More sharing options...
weaponx Posted October 24, 2007 Share Posted October 24, 2007 (edited) HotKeySet("{ESC}", "MyExit") AdlibEnable ( "Press",100) While 1 WEnd Func Press() ;Opt("SendKeyDelay", 1000) Opt("SendKeyDownDelay", 500) ;Send("{LSHIFT}", 1) Send("K", 1) EndFunc Func MyExit() Exit EndFunc ;==>MyExit You may get different results by uncommenting ;Opt("SendKeyDelay", 1000) Edited October 24, 2007 by weaponx Link to comment Share on other sites More sharing options...
Nevin Posted October 24, 2007 Share Posted October 24, 2007 (edited) I'm searching for a easy script that: Sleep 10s and then: Shift key pressing every 100ms (SendKeyDelay= 100), and pressed for 10ms (SendKeyDownDelay=10). It ends when I Press ESC. I'm asking for it because I can't make HotKeySet to work -.- I know I'm very newbie. Thanks in advanceWhat did you need HotKeySet for? To check for the ESC? I'm not too good with Autoit either, but maybe I can help. #include <Misc.au3>;This library is needed for the IsPressed function Opt("SendKeyDownDelay",10) Sleep(10000) While 1;infinite loop if _IsPressed("1B") Then;This checks to see if a key is pressed, 1B is the hex code for the ESC key ExitLoop; EndIf Sleep(100) Send("{LSHIFT}");presses the left shift key WEnd I hope that helps. Note that I didn't use the sendkeydowndelay option. edit: Snap. I took so long replying that someone beat me to it Edited October 24, 2007 by Nevin Link to comment Share on other sites More sharing options...
weaponx Posted October 24, 2007 Share Posted October 24, 2007 Nevin what is the purpose of Sleep(10000)? Link to comment Share on other sites More sharing options...
Nihilum Posted October 24, 2007 Author Share Posted October 24, 2007 thanks alot mates you've helped me so much you both Link to comment Share on other sites More sharing options...
Nevin Posted October 25, 2007 Share Posted October 25, 2007 Nevin what is the purpose of Sleep(10000)?In the first post he said he wanted the script to "Sleep 10s" first.thanks alot mates you've helped me so much you bothGlad to be of help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now