Fantasyman1919 Posted December 13, 2005 Share Posted December 13, 2005 Can someone help me with the code that will not let the script start till i press a buttion. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 13, 2005 Moderators Share Posted December 13, 2005 Look at HotKeySet() in the help file. There is an example there. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Fantasyman1919 Posted December 13, 2005 Author Share Posted December 13, 2005 Look at HotKeySet() in the help file. There is an example there.I did but that did not help me I have no idea how to make it pause the script till I press a buttion to have it start. here is my script.; Press Esc to terminate script, Pause/Break to "pause"Global $PausedHotKeySet("{PAUSE}", "TogglePause")HotKeySet("{ESC}", "Terminate")HotKeySet("+!d", "ShowMessage") ;Shift-Alt-Func TogglePause()$Paused = NOT $PausedWhile $Pausedsleep(100)ToolTip('Script is "Paused"',0,0)WEndToolTip("")EndFuncFunc Terminate()Exit 0EndFuncFunc ShowMessage()MsgBox(4096,"","This is a message.")EndFunci cut the script out but that is what i have. That will kill the script and pause it but i dont know how to change it to start the scrip paused to i press something to start it. could you help me with the right script Link to comment Share on other sites More sharing options...
Knight Posted December 13, 2005 Share Posted December 13, 2005 (edited) Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt- TogglePause();Calls TogglePause function before doing rest of script. ;Main Script goes here! Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Edited December 13, 2005 by Knight Link to comment Share on other sites More sharing options...
Fantasyman1919 Posted December 13, 2005 Author Share Posted December 13, 2005 Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt- TogglePause();Calls TogglePause function before doing rest of script. ;Main Script goes here! Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFuncThanks a lot. 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