Basic Script Help Needed

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
byrne86
Newbie
Posts: 7
Joined: Fri Oct 15, 2010 7:56 pm

Basic Script Help Needed

Post by byrne86 » Fri Oct 15, 2010 11:10 pm

Iv got a script with lots of different subroutines, I start the subroutines with buttons.

The problem is, when I click another button on my dialog, I want it to go to the subroutine associated with that button, and stop the subroutine that is in progress.

For example:

SRT>sub
repeat>task
Something.. . . ...
until>task=10
End>sub

SRT>stopsub
something......
END>stopsub

how can my button to start stopsub, which I want to use to stop the loop that sub is performing?

So basically,how can I make a button jump straight to a different subroutine even if another one is currently cycling through a loop?

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Fri Oct 15, 2010 11:58 pm

You might try an OnEvent handler

Code: Select all

OnEvent>EventType,EventParm,ExtraParm,Subroutine

Not supported in Macro Scheduler Lite.
Establishes an event handler.  When the event occurs the script branches to the specified Subroutine. 

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts