help with "cancel"

Discuss and share scripts and script files...
Post Reply
calude
Posts: 355
Joined: 13 Aug 2008 10:16
Location: Switzerland
Contact:

help with "cancel"

Post by calude »

hi
the joined catalog script closes all windows then opens a set of preset tabs for me.
a warning pop up tells me "close all other tabs (including locked and home tabs) and loose all their settings"
OK or Cancel
I click OK and XYplorer does its script magic
so far so good, works as intended
but
if I want to Cancel the operation at the pop up, XYplorer still executes its script.
what should I add to the script so it really aborts the operation?

thanks

Calude

Code: Select all

#353; //#353	View | Tab | Close All Other Tabs...
 #329; //#329	View | Sort By | Path
 goto "D:\CV_mes_documents\a\folderA\";
 #340; //#340	View | Tab | New Tab
 goto "D:\CV_mes_documents\a\folderB\";
 #340; //#340	View | Tab | New Tab
 goto "D:\CV_mes_documents\a\folderC\";
 #340; //#340	View | Tab | New Tab
 goto "D:\CV_mes_documents\a\folderD\";
 #340; //#340	View | Tab | New Tab
 goto "D:\CV_mes_documents\a\folderE\";
 #340; //#340	View | Tab | New Tab
 goto "D:\CV_mes_documents\a\folderF\";
Last edited by calude on 11 May 2012 11:40, edited 1 time in total.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: help with "cancel"

Post by Stefan »

From where did this warning comes from?
From one of the used commands? (Command numbers #123 without an added //comment are not easy to understood :( )

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

Re: help with "cancel"

Post by highend »

delete your #353; and replace it with a confirm() command and use it's return value (0|1)
for an if(){} block and finally a tab("closeothers") in it.
One of my scripts helped you out? Please donate via Paypal

Post Reply