AlfzZz Posted September 24, 2006 Share Posted September 24, 2006 ; ---------------------------------------------------------------------------- ; ;Starting Programing, ; My demo 2 ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here Global $Paused HotKeySet("{INSERT}", "TogglePause") HotKeySet("{END}", "Terminate") Func TogglePause() $Paused = NOT $Paused While $Paused Send("a") sleep (200) WEnd EndFunc Func Terminate() Exit 0 EndFunc im trying to make the program start when i hit insert and end when i hit end. Right now it does nothing Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 24, 2006 Share Posted September 24, 2006 you have to have a loop Global $Paused HotKeySet("{INSERT}", "TogglePause") HotKeySet("{END}", "Terminate") while 1 sleep(100) wend Func TogglePause() $Paused = NOT $Paused While $Paused Send("a") sleep (200) WEnd EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
AlfzZz Posted September 24, 2006 Author Share Posted September 24, 2006 you have to have a loop Global $Paused HotKeySet("{INSERT}", "TogglePause") HotKeySet("{END}", "Terminate") while 1 sleep(100) wend Func TogglePause() $Paused = NOT $Paused While $Paused Send("a") sleep (200) WEnd EndFunc Func Terminate() Exit 0 EndFunc Wow >< i really need to keep reading the manual so is this the right way to do it?? Global $Paused HotKeySet("{INSERT}", "TogglePause") HotKeySet("{END}", "Terminate") [b]while 1 sleep(100)[/b] wend Func TogglePause() $Paused = NOT $Paused While $Paused Send("a") sleep (200) WEnd EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
theguy0000 Posted September 24, 2006 Share Posted September 24, 2006 Wow >< i really need to keep reading the manual so is this the right way to do it?? Global $Paused HotKeySet("{INSERT}", "TogglePause") HotKeySet("{END}", "Terminate") [b]while 1 sleep(100)[/b] wend Func TogglePause() $Paused = NOT $Paused While $Paused Send("a") sleep (200) WEnd EndFunc Func Terminate() Exit 0 EndFuncwithout the [ b ] [/ b ] tags in it, it should work The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN 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