kazhkaz Posted April 28, 2006 Share Posted April 28, 2006 Hello I found out how to end script with hoekeyset but i dont know how to set, that the script will start paused, and then after i press some hotkey it will start going thanks for help HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") Global $Paused Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc While 1 Send("{F4}") Sleep(1000) MouseClick("left" , 362, 333) Sleep(1000) MouseClick("left" , 148, 65) WEnd Link to comment Share on other sites More sharing options...
jvanegmond Posted April 28, 2006 Share Posted April 28, 2006 (edited) Simply make it start by Toggling Pause here you go: HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") Global $Paused TogglePause() Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc While 1 Send("{F4}") Sleep(1000) MouseClick("left" , 362, 333) Sleep(1000) MouseClick("left" , 148, 65) WEnd Also it might be a good idea to put your functions at the end of your script, so you can get a better look at what your script does. Edited April 28, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
kazhkaz Posted April 28, 2006 Author Share Posted April 28, 2006 thanks i think it will work fine 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