Omar Posted February 23, 2007 Share Posted February 23, 2007 Is there any way to put a universal reset or interrupt into a script besides function calls every line? I'm looking to break loops on a given command or keystroke. Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 23, 2007 Share Posted February 23, 2007 I've never heard of such a thing. I doubt it would be plausible due to the need to check every line anyways. You will most likely have to do it yourself. I suggest an automation of those lines being inserted. Link to comment Share on other sites More sharing options...
Omar Posted February 23, 2007 Author Share Posted February 23, 2007 I've never heard of such a thing. I doubt it would be plausible due to the need to check every line anyways. You will most likely have to do it yourself. I suggest an automation of those lines being inserted.Alright thanks i was afraid of that. Link to comment Share on other sites More sharing options...
Valuater Posted February 23, 2007 Share Posted February 23, 2007 do you mean like this ??? ; Press Esc to terminate script, [color="#ffffff"]Pause[/color]/Break to "[color="#ffffff"]pause[/color]" Global $Paused HotKeySet("{[color="#ffffff"]PAUSE[/color]}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; 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 8) Link to comment Share on other sites More sharing options...
Omar Posted February 26, 2007 Author Share Posted February 26, 2007 do you mean like this ??? ; Press Esc to terminate script, [color="#ffffff"]Pause[/color]/Break to "[color="#ffffff"]pause[/color]" Global $Paused HotKeySet("{[color="#ffffff"]PAUSE[/color]}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; 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 oÝ÷ ÛÏêº^²í¡ú'¶«m¶¶»#¬¶§)àÞ¡öºÚ"µÍÎÎÎÈÙHÙÙÜ[HÛÝ[ÛÈHÎÎÎÂÚ[HH ÌÍÛ[HHÛÝ[ BÑ[ÎÎÎÎÎÎÎÂ[ÈÛÝ[ BÚ[HH ÈLÌÍÚHH ÌÍÚH ÈBÔ[ÛH[ÈÙÛÙWBÙ[[[ Of course this is an extremely easy example but what I would like to see happen is a hotkey to interrupt the function in progress, and resume back to the while loop in the body while the while loop in the function is running. I know i could do checks between each line of code but I was looking for something else that may be easier, which probably doesn't exist. thanks for the responses. 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