Closing All Other Tabs...
Closing All Other Tabs...
I have a script which, among the others, executes the command #353 (View / Tab / Close All Other Tabs...).
Upon its execution a window pops up, asking if I'm really sure I want to close all the other tabs, even if they have a home set.
Is there any way I can suppress this warning window, or send and Enter stroke automatically?
Upon its execution a window pops up, asking if I'm really sure I want to close all the other tabs, even if they have a home set.
Is there any way I can suppress this warning window, or send and Enter stroke automatically?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: Closing All Other Tabs...
I never had any problems with #352; as long as they aren't locked tabs.
Edit: Works (partially), but tabs with a home set aren't closed ;(
Second edit: You could use the tab scripting command and iterate through all available tabs in a pane, remove the home location and then use #352. That would work.
Edit: Works (partially), but tabs with a home set aren't closed ;(
Second edit: You could use the tab scripting command and iterate through all available tabs in a pane, remove the home location and then use #352. That would work.
One of my scripts helped you out? Please donate via Paypal
Re: Closing All Other Tabs...
Yep, that's why I use #353, I want to end with just one tab and being sure all the others are closed, regardless of their locked/homed/whatever status...
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: Closing All Other Tabs...
Then iterate through them and reset the current home location + lock status and after that use the #352 command. Works.
One of my scripts helped you out? Please donate via Paypal
Re: Closing All Other Tabs...
After a night spent thinking about that, I realize that the code complexity and run time is not worth, and just pressing Enter is fine enough.
Anyway thanks for your insight.
Anyway thanks for your insight.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: Closing All Other Tabs...
Code: Select all
$i= 0;
$Tabs = tab(, "c");
while ($i <= $Tabs) {
tab("sethome", , $i); //remove home
tab("lock", 0, $i); //remove lock
$i++;
}
#352;
Last edited by highend on 28 Nov 2011 14:41, edited 1 time in total.
One of my scripts helped you out? Please donate via Paypal
Re: Closing All Other Tabs...
the above code is working like a charm. thanks a lot.
Re: Closing All Other Tabs...
Well, thanks for your help, although there's no similar way to take care of tabs with a locked home zone. You can toggle their status, but not programmatically disable it.highend wrote:[cut]This was too complex? oO
A possible way could be:
1. executing your script
2. set the current path as home for each remaining tab
3. toggling their locked home status (which will become off for sure)
4. remove home
5. close all the unlocked. You end with just one tab.
But as you can see, we have at least two while loops plus flickering tabs in a set-and-forget script, compared to a native function that just requires to press Enter.
I'm not sure which is the best...
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: Closing All Other Tabs...
Sure, a scriptable #353 command (that allows us to use it without the security message) would be a much better option...
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60603
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Closing All Other Tabs...
Voila!
Code: Select all
+ SC tab enhanced: New operation "closeother", analog to "Close All
Other Tabs..." in menu View | Tab.
The data parameter can be used to control whether any prompts are
shown:
// show no prompts
tab("closeother");
// show prompts
tab("closeother", 1);
FAQ | XY News RSS | XY Twitter
Re: Closing All Other Tabs...
We would say "make a statue to someone [Don]" over here to express appreciation... *thumbs up*admin wrote:Voila!Code: Select all
+ SC tab enhanced: New operation "closeother", analog to "Close All Other Tabs..." in menu View | Tab. The data parameter can be used to control whether any prompts are shown: // show no prompts tab("closeother"); // show prompts tab("closeother", 1);
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
- Site Admin
- Posts: 60603
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Closing All Other Tabs...
BTW, I just changed it to "closeothers", I think it's better english...
FAQ | XY News RSS | XY Twitter
Re: Closing All Other Tabs...
I think the explicit meaning is CloseAllOthers ,so CloseOthers is better than CloseOtheradmin wrote:
BTW, I just changed it to "closeothers", I think it's better english...
Did you also think of CloseOne, in short: Close?
Win11 Pro 223H2 Gerrman
Re: Closing All Other Tabs...
#351?
Edit: you mean a way to close a tab without selecting it (via scripting of course)?
Edit: you mean a way to close a tab without selecting it (via scripting of course)?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
- Site Admin
- Posts: 60603
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Closing All Other Tabs...
Well, now that you mention it ... ... ... done.PeterH wrote:Did you also think of CloseOne, in short: Close?
FAQ | XY News RSS | XY Twitter