How can I notify or restart the entire script if an error occurs at any step during the execution?
Hi @sdricky ,
I think you’re looking for “onError” (for restart ir jump to a special point in the script) or “throwError” (displays an error message)
I have not tested it but i should work:
- Disable the script to stop on errors with setting “!errorignore” to true
- Check the variable value “!StatusOK” is false to test on several occasions placed into your Script to if there was an an error
- If so, use the “goto” command to jump back to a label places at the beginning of your script.
Note: Make sure to reset the variable “!StatusOK” to true, to reset it.
But I also just checked the solution above from raccoon and that might be the better way to go.
- onError | #restart
→ Restarts the macro if an error happens (same as manually clicking PLAY again- this resets all variables and counters, except the global variable)
- onError | #goto | LABEL
→ Jumps to “LABEL” if an error happens.