Is there an unambigous command to force a script to a graceful end?
Thanks!
Forcing script to end?
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
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
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.
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
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.Ask>Do you want to quit?,Quit
If>%Quit%=YES,End
....
....
....
Label>End
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!
Bob
A humble man and PROUD of it!