end main script called separately when running a label script

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

end main script called separately when running a label script

Post by klownboy »

I have a situation where, in a CTB, I call out a script with label and then load the main script separately as shown below:
load "<xyscripts>\RecentFolders&Favs.xys", "_loadrecent"; load "<xyscripts>\RecentFolders&Favs.xys";

There is a condition which is encountered when running the script with label where I would like to end not only the label script but the running of the main script. The end statement even with the scope of "0" or "1" will only end the label script as expected, but since the main script is called out separately, it still will run. So that's expected also. I can set a perm variable in the label script such that if the variable is a certain value then the main script would end at the very start. Would there be any other way to accomplish this that I may have missed? Thanks.

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: end main script called separately when running a label script

Post by highend »

Yeah, put the check if the label script is running in the "_Initialize" section
One of my scripts helped you out? Please donate via Paypal

Post Reply