Hi, me again!
I am trying to make the scritp to exit on error. What is the best way to do that from inside the script ?
I tried to send CTRL-B or SHIFT-ESC but my test app does not respond to thoses.
I am trying to do something like:
If>{%WW_RESULT%="FALSE"}
Exit
Else
MessageModal>All is good. Continue.
EndIf
OR
If>{%WW_RESULT%="FALSE"}
Goto>EndLabel
Else
MessageModal>All is good. Continue.
EndIf
Label>EndLabel
bla bla
The problem for the 2nd case is that if all is good, the script will also execute the 'Label' code just because it is following the EndIf.
What is the best/easiest way to exit internally ?
Thanks!
Is there a way to abort a script, within the script itself ?
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
So why not:
If>{%WW_RESULT%="FALSE"}
Goto>EndLabel
Else
MessageModal>All is good. Continue.
EndIf
Goto>EndScript
Label>EndLabel
bla bla
//very end of script
Label>EndScript
If>{%WW_RESULT%="FALSE"}
Goto>EndLabel
Else
MessageModal>All is good. Continue.
EndIf
Goto>EndScript
Label>EndLabel
bla bla
//very end of script
Label>EndScript
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
keep it simple whenever possible. No need for the brackets {} in this case.
If>WW_RESULT=False
goto>EndProgram
else
goto>WhatIsNext
endif
label>WhatIsNext
.....
label>EndProgram
mdl>All done
Also, if you want to break execution of the program you might try adding an On_Event for a specific keystroke combination.
If>WW_RESULT=False
goto>EndProgram
else
goto>WhatIsNext
endif
label>WhatIsNext
.....
label>EndProgram
mdl>All done
Also, if you want to break execution of the program you might try adding an On_Event for a specific keystroke combination.