Hi all
I am trying to make George Script stop completely from within a function if an error has occurred.
According to http://wiki.tvpaint.com/index.php?title=EXIT" onclick="window.open(this.href);return false;, "EXIT" "Quits the George program." but it seems to me that EXIT only exit the current function and not the entire script.
Any inputs?
Brian.
Quiting George script from a function
Re: Quiting George script from a function
Since the interpreter can't know whether you just want to exit the function or exit the entire script...
Initialize a global ExitFlag = 0.
Inside any function at the point where you want to make a script-exit, set the global ExitFlag = 1, immediately before you EXIT from the function.
Back in the main section, immediately after you've called any function that might contain a script-EXIT, test the ExitFlag and if == 1, then immediately EXIT the main section and you're out.
Sven
Initialize a global ExitFlag = 0.
Inside any function at the point where you want to make a script-exit, set the global ExitFlag = 1, immediately before you EXIT from the function.
Back in the main section, immediately after you've called any function that might contain a script-EXIT, test the ExitFlag and if == 1, then immediately EXIT the main section and you're out.
Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
-
- Posts: 10
- Joined: 20 Dec 2012, 13:30
Re: Quiting George script from a function
Thanks for your prompt reply Sven.
I have a global errorlevel now which I use where applicable.
Brian.
I have a global errorlevel now which I use where applicable.
Brian.