Forcing script to end?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
craig eades
Newbie
Posts: 4
Joined: Wed Sep 01, 2004 10:53 pm

Forcing script to end?

Post by craig eades » Fri Sep 10, 2004 6:35 pm

Is there an unambigous command to force a script to a graceful end?

Thanks!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Sep 10, 2004 6:55 pm

Script will end automatically when it completes the last line of script.

If you want to exit early you can put in some type of IF> function, to jump to the end that is labelled.
Like Label>End
Ask>Do you want to quit?,Quit
If>%Quit%=YES,End
....
....
....

Label>End
Don't need to prompt with an ASK> function, can use any variable at all that you can test with IF>. Could use a file size, a date, a counter value, a value in a string from a file, etc.

When troubleshooting, it can be helpful to add GoTo>End at various points in the script, and disable the line when running real time, not troubleshooting. Will work as long as last line is Label>End

Note that labels are case sensitive, and trailing spaces will cause problems.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Guest

Post by Guest » Fri Sep 10, 2004 7:39 pm

Thanks for your help.

Craig

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