Page 1 of 1

a easyscript quseion

Posted: Mon Nov 14, 2016 9:06 pm
by icestormeraacc
first time to here if i have wrong post to here i am so sorry!

i have script to run and i have set a hotkey to pause it but know i dont know who to resum it(to start it again)
is it the command [continue]???

plz help i am new to scripting

Re: a easyscript quseion

Posted: Wed Nov 22, 2017 12:07 pm
by AshleyCuneo
This is the question, I'd like to research online! It's pretty clear! This is not a wrong place to publish!

Re: a easyscript quseion

Posted: Fri Nov 24, 2017 5:09 am
by Shindaril
Hiya,

I'm assuming you are talking about EasyUO script, if that's the case, the command "pause" resumes when you play the script again. If you want a script you can pause and resume by a hotkey, it's easy to do with a loop sub that is called when the hotkey is pushed and only polls for the hotkey to resume.

Something like:

Code: Select all

; Somewhere in the mainloop:
onhotkey %hotkey
    gosub Paused

...

sub Paused
    ; wait 2s
    while #True
    {
        onhotkey %hotkey
            break
    }
    return
You might need that wait in the sub before the loop to avoid EasyUO from returning to the mainloop asap if you use the same hotkey for pausing and resuming.