uber125 Posted May 25, 2008 Share Posted May 25, 2008 (edited) Why does this script run each function only one time, and do it not again? I have to restart the script after each function is ran to run it again... why??? Am I missing something here? HotKeySet("6", "Send6Then2");6 HotKeySet("5", "Send5Then3");5 While 1 Sleep(100) WEnd Func Send6Then2() HotkeySet (@HotKeyPressed) Send(@HotKeyPressed) Sleep(300) Send("2") EndFunc Func Send5Then3() HotkeySet (@HotKeyPressed) Send(@HotKeyPressed) Sleep(300) Send("3") EndFunc Func Terminate() Exit 0 EndFunc Edited May 25, 2008 by uber125 Link to comment Share on other sites More sharing options...
Developers Jos Posted May 25, 2008 Developers Share Posted May 25, 2008 You are resetting the HotKey, but don't set it again at the end of the Func. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
uber125 Posted May 25, 2008 Author Share Posted May 25, 2008 I hear what you're saying man, but I just don't understand. Link to comment Share on other sites More sharing options...
ChrisL Posted May 25, 2008 Share Posted May 25, 2008 (edited) You disable the hotkey during your functions but didn't reset it at the end. See below HotKeySet("6", "Send6Then2");6 HotKeySet("5", "Send5Then3");5 While 1 Sleep(100) WEnd Func Send6Then2() HotkeySet (@HotKeyPressed) Send(@HotKeyPressed) Sleep(300) Send("2") HotkeySet (@HotKeyPressed,"Send6Then2") EndFunc Func Send5Then3() HotkeySet (@HotKeyPressed) Send(@HotKeyPressed) Sleep(300) Send("3") HotkeySet (@HotKeyPressed,"Send5Then3") EndFunc Func Terminate() Exit 0 EndFunc Edited May 25, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
uber125 Posted May 25, 2008 Author Share Posted May 25, 2008 Ooooohhhhhhhhh, I see now. Thank you very much. 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