If> X, Stop Macro

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Dexter1
Pro Scripter
Posts: 64
Joined: Mon Jun 19, 2006 3:28 pm

If> X, Stop Macro

Post by Dexter1 » Mon Jan 26, 2009 5:05 pm

I am reading a line in a text file to see if it needs to be updated. If it does not, I want to stop the macro.

Everything I find about Stop is referring to using the Stop button in the MS interface or the one in the system tray.

Thanks,
Josh
Thanks,
Josh

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jan 26, 2009 5:28 pm

Either jump to a label at the end of the script. Or just use the Exit command:

1)

Code: Select all

If>x=something
  Goto>end
Endif
..
.. rest of script here
.. 
Label>end
2)

Code: Select all

If>x=something
  Exit>0
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Dexter1
Pro Scripter
Posts: 64
Joined: Mon Jun 19, 2006 3:28 pm

Post by Dexter1 » Mon Jan 26, 2009 5:44 pm

Option one worked perfectly.
Thanks
Thanks,
Josh

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