How to create a Pause / Resume button

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
rocklin
Newbie
Posts: 2
Joined: Thu Aug 05, 2021 8:40 pm

How to create a Pause / Resume button

Post by rocklin » Thu Aug 05, 2021 8:48 pm

Hi,

I'm new to Macro Scheduler, and I'm trying to figure out how to create a "resume" button that will pause my macro when it appears, then resume the macro when I click on it.

Or, if that's not possible, just a pause button that will pause/ resume the macro when clicked.

TIA for any help.

User avatar
Grovkillen
Automation Wizard
Posts: 1128
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: How to create a Pause / Resume button

Post by Grovkillen » Fri Aug 06, 2021 5:33 am

Use a dialog and then the command show. If you add a return variable to the show command it will make the dialog "modal" which is what you want.
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1378
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: How to create a Pause / Resume button

Post by Dorian (MJT support) » Fri Aug 06, 2021 9:46 am

Also a simple MessageModal will do that too. It'll pause the script until you click OK :

Code: Select all

MessageModal>I'm waiting until you click OK
You can even ask a YES/NO question to ask if you want to continue :

Code: Select all

//Ask the question
Ask>Do you wish to continue?,Continue

//Exit if the answer is no
If>Continue=NO
  exit
Endif

//Continue here if the answer wasn't no.
messagemodal>hello, I'm still running
Yes, we have a Custom Scripting Service. Message me or go here

rocklin
Newbie
Posts: 2
Joined: Thu Aug 05, 2021 8:40 pm

Re: How to create a Pause / Resume button

Post by rocklin » Mon Aug 09, 2021 10:42 am

"MessageModal>I'm waiting until you click OK" is the simplest choice for me.

I've got 3 different macro programs running at the same time (Macro Scheduler, TypeItIn and DisplayFusion) and they make my time on the computer a lot easier.

Thanks to Grovkillen and Dorian for your help.

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