Loraik 0 Posted March 9, 2005 Is there a way to pause a running script via hitting a key and allowing you to let it pickup where it left off by hitting another key? Is that some major coding feat or is there a simple pause cmd that I am just not seeing in the docs. Thanks Loraik Share this post Link to post Share on other sites
Blue_Drache 260 Posted March 9, 2005 Is there a way to pause a running script via hitting a key and allowing you to let it pickup where it left off by hitting another key? Is that some major coding feat or is there a simple pause cmd that I am just not seeing in the docs.ThanksLoraik<{POST_SNAPBACK}>Try an AdLib function and a toggle function.Dim $pause = 0 HotKeySet("{pause}","PauseIt") AdLibEnable("_IsPaused",250) . . . Func PauseIt(ByRef $pause) If $pause = 0 then $pause = 1 If $pause = 1 then $pause = 0 EndFunc Func _IsPaused(ByRef $pause) If $pause = 1 then Do Sleep(50) Until $pause = 0 EndIf EndFuncThis code is untested, and may not work as expected. This was just out of the top of my head. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Share this post Link to post Share on other sites
Coffee 0 Posted March 9, 2005 Run and study the example given under "HotKeySet" in the help file. Share this post Link to post Share on other sites
trids 2 Posted March 10, 2005 It's already built in .. all you need to do is click on the icon in the system tray! This will pause your script - and to un-pause it, just un-check the "Paused" option. Couldn't be simpler Share this post Link to post Share on other sites
Blue_Drache 260 Posted March 10, 2005 It's already built in .. all you need to do is click on the icon in the system tray! This will pause your script - and to un-pause it, just un-check the "Paused" option.Couldn't be simpler <{POST_SNAPBACK}>True, but in some fullscreen applications (such as City of Heros) one cannot alt-tab out, and one cannot summon the toolbar/tray to click the icon. Some form of anti-cheat to keep people from running bots or scripts. Doesn't stop me...I just use a hotkey to keep my scripts paused (in a sleep(500) loop) until I need them.In this case, one would have to simulate a control click to the tray on the correct icon. I honestly don't know if it's possible to do this in a fullscreen app. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Share this post Link to post Share on other sites