Jump to content

Reset / Interrupt Script function?


Omar
 Share

Recommended Posts

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

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)

NEWHeader1.png

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...