Loraik Posted March 9, 2005 Share 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 Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 9, 2005 Share 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 Link to comment Share on other sites More sharing options...
Coffee Posted March 9, 2005 Share Posted March 9, 2005 Run and study the example given under "HotKeySet" in the help file. Link to comment Share on other sites More sharing options...
trids Posted March 10, 2005 Share 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 Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 10, 2005 Share 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 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