culexdd Posted July 27, 2015 Share Posted July 27, 2015 (edited) Hi, so, i have a script which i use to make one hotkey press itself after another key, the Script is working fine, i have no problems at all...But i can't find a way to make it work the way i want... what i want is for when the script is paused, for the hotkeys i set to be free, to be typed without problem, and when the script is upaused, for it to send the hotkeys to the functions...well, maybe you can help me as i have looked for it and not found it anywhere (probably because of bad wording, or not knowing what to search for.).Please do bear in mind i have about 1 hour of knowledge about AutoIT and english isn't my main language.This is what i got so far...expandcollapse popupOpt("SendKeyDelay", 50) Opt("SendKeyDownDelay", 100) Global $Paused HotKeySet("3", "Hotkey1") HotKeySet("2", "Hotkey2") HotKeySet("e", "Hotkey3") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{F5}", "Terminate") While 1 Sleep(500) ToolTip("...",0,0) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is Paused', 0, 0) WEnd ToolTip("") EndFunc Func Hotkey1() If $Paused Then Sleep(100) ElseIf Not $Paused Then HotKeySet("3") ToolTip("1...",0,0) Send("{SPACE}") Sleep(50) Send("3") HotKeySet("3", "Hotkey1") EndIf EndFunc Func Hotkey2() If $Paused Then Sleep(100) ElseIf Not $Paused Then HotKeySet("2") ToolTip("2...",0,0) Send("{SPACE}") Sleep(50) Send("2") HotKeySet("2", "Hotkey2") EndIf EndFunc Func Hotkey3() If $Paused Then Sleep(100) ElseIf Not $Paused Then HotKeySet("e") ToolTip("3...",0,0) Send("{SPACE}") Sleep(50) Send("e") HotKeySet("e", "Hotkey3") EndIf EndFunc Func Terminate() Exit 0 EndFuncAny help is welcome, thank you. Edited July 27, 2015 by culexdd Link to comment Share on other sites More sharing options...
JohnOne Posted July 27, 2015 Share Posted July 27, 2015 Unset the HotKeys before entering your pause loop, and reset then when loop exits. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
culexdd Posted July 27, 2015 Author Share Posted July 27, 2015 (edited) i see, that makes sense.i'll search how to do that, thank you so much.if i run into any problems i'll post soon, btw, is there any keyword i should search for how to do that? Edited July 27, 2015 by culexdd Link to comment Share on other sites More sharing options...
JohnOne Posted July 27, 2015 Share Posted July 27, 2015 I thought you knew.This line in your code unsets the 2 hotkey.HotKeySet("2") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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