A Wiser Restart Without Saving, please

Features wanted...
Post Reply
Slideshow BoB
Posts: 41
Joined: 03 Apr 2024 18:46

A Wiser Restart Without Saving, please

Post by Slideshow BoB »

I'm experimenting more with .ini file. I'm really astonished by finding out how flexible things are here.
But I'm really finding it a pain to restart without saving many unwanted changes other than my current set of tabs on 2 pane mode, which I'd like to preserve with no hassles thus streamlining my workflow. Can this be improved by any means, please?

RalphM
Posts: 2042
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: A Wiser Restart Without Saving, please

Post by RalphM »

Ever looked into tabsets?
These allow you to preserve whatever tab combinations you want (per pane though).
If you want it for both panes in one go, you might want to check out the session manager script in the scripts forum.
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

Slideshow BoB
Posts: 41
Joined: 03 Apr 2024 18:46

Re: A Wiser Restart Without Saving, please

Post by Slideshow BoB »

RalphM wrote: 10 Oct 2025 01:29 Ever looked into tabsets?
These allow you to preserve whatever tab combinations you want (per pane though).
If you want it for both panes in one go, you might want to check out the session manager script in the scripts forum.
"Wiser, snappier, clever, smarter" should be on title.
Tabsets require too much maintenance for my taste for the case in mind. Script? Almost sure it would add an extra layer of intervention.
I just think sets of tabs are a too important piece of file management experience for it to be this hard to keep under a mundane need. Thanks for the input, though.

bossi
Posts: 144
Joined: 30 Jul 2022 11:09
Location: Win11-latest, XYx64 latest, 4K@100%

Re: A Wiser Restart Without Saving, please

Post by bossi »

this stores tabset into a separate storage so you can always restore exactly as you stored it

Code: Select all

	function TABSET_($sel){

		if $sel == "change"{ // loads tabset from \Panes\
			$list = listfolder("<xydata>\Panes", "*", 2);
			$listn = replace($list, "<xydata>\Panes\");
			$s = popupmenu($listn);			
			if $s{
				tabset("load", $s);
			}			
		}
		if $sel == "store"{ // stores tabset into \Panes_Storage\
			$pane = tabset("save");
			if ($pane) {
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane_storage;
				copyitem $pane, $pane_storage;
			}
		}
		if $sel == "store_as"{  // stores tabset into \Panes_Storage\ under new name
			$input = input();			
			$pane = tabset("save");  
			if ($input) {
				$destination = "<xydata>\Panes\" . $input;
				$destination_storage = "<xydata>\Panes_Storage\" . $input;
				copyitem $pane, $destination;
				copyitem $pane, $destination_storage;
				tabset("load", $destination);
			}
		}
		if $sel == "restore"{ // restores tabset from \Panes_Storage\  
			// \Panes\ <--overwrite-- \Panes_Storage\
			$pane = tabset("save"); 
			if ($pane) {
				tabset("load", "z_switch");
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane;
				copyitem $pane_storage, $pane;
				tabset("load", $pane);
			}
		}
	}

admin
Site Admin
Posts: 64828
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: A Wiser Restart Without Saving, please

Post by admin »

Slideshow BoB wrote: 09 Oct 2025 20:34 But I'm really finding it a pain to restart without saving many unwanted changes other than my current set of tabs on 2 pane mode...
Is that set of tabs constantly changing? Otherwise just save settings once with the tabs you like, then restart without saving later.

Slideshow BoB
Posts: 41
Joined: 03 Apr 2024 18:46

Re: A Wiser Restart Without Saving, please

Post by Slideshow BoB »

admin wrote: 10 Oct 2025 17:24
Slideshow BoB wrote: 09 Oct 2025 20:34 But I'm really finding it a pain to restart without saving many unwanted changes other than my current set of tabs on 2 pane mode...
Is that set of tabs constantly changing?
Exactly.
The more I test stuff in XYplorer the more I'd like to have this always ready 'restore last active tabs and sorting while not saving anything else' feature. Tabsets may be an answer for a more or less constant set of tabs, but having the hands dirt on many active tasks which may or may not be file-management related completely break those sets for me whilst demanding a need for such a warm, welcoming snapshot of current 'tabsets', whatever the state they're currently in.

Slideshow BoB
Posts: 41
Joined: 03 Apr 2024 18:46

Re: A Wiser Restart Without Saving, please

Post by Slideshow BoB »

bossi wrote: 10 Oct 2025 17:01 this stores tabset into a separate storage so you can always restore exactly as you stored it

Code: Select all

	function TABSET_($sel){

		if $sel == "change"{ // loads tabset from \Panes\
			$list = listfolder("<xydata>\Panes", "*", 2);
			$listn = replace($list, "<xydata>\Panes\");
			$s = popupmenu($listn);			
			if $s{
				tabset("load", $s);
			}			
		}
		if $sel == "store"{ // stores tabset into \Panes_Storage\
			$pane = tabset("save");
			if ($pane) {
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane_storage;
				copyitem $pane, $pane_storage;
			}
		}
		if $sel == "store_as"{  // stores tabset into \Panes_Storage\ under new name
			$input = input();			
			$pane = tabset("save");  
			if ($input) {
				$destination = "<xydata>\Panes\" . $input;
				$destination_storage = "<xydata>\Panes_Storage\" . $input;
				copyitem $pane, $destination;
				copyitem $pane, $destination_storage;
				tabset("load", $destination);
			}
		}
		if $sel == "restore"{ // restores tabset from \Panes_Storage\  
			// \Panes\ <--overwrite-- \Panes_Storage\
			$pane = tabset("save"); 
			if ($pane) {
				tabset("load", "z_switch");
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane;
				copyitem $pane_storage, $pane;
				tabset("load", $pane);
			}
		}
	}
I'll take a closer inspection on what you've shared as soon as time permits, thank you very much.

Slideshow BoB
Posts: 41
Joined: 03 Apr 2024 18:46

Re: A Wiser Restart Without Saving, please

Post by Slideshow BoB »

Slideshow BoB wrote: 10 Oct 2025 18:08
bossi wrote: 10 Oct 2025 17:01 this stores tabset into a separate storage so you can always restore exactly as you stored it

Code: Select all

	function TABSET_($sel){

		if $sel == "change"{ // loads tabset from \Panes\
			$list = listfolder("<xydata>\Panes", "*", 2);
			$listn = replace($list, "<xydata>\Panes\");
			$s = popupmenu($listn);			
			if $s{
				tabset("load", $s);
			}			
		}
		if $sel == "store"{ // stores tabset into \Panes_Storage\
			$pane = tabset("save");
			if ($pane) {
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane_storage;
				copyitem $pane, $pane_storage;
			}
		}
		if $sel == "store_as"{  // stores tabset into \Panes_Storage\ under new name
			$input = input();			
			$pane = tabset("save");  
			if ($input) {
				$destination = "<xydata>\Panes\" . $input;
				$destination_storage = "<xydata>\Panes_Storage\" . $input;
				copyitem $pane, $destination;
				copyitem $pane, $destination_storage;
				tabset("load", $destination);
			}
		}
		if $sel == "restore"{ // restores tabset from \Panes_Storage\  
			// \Panes\ <--overwrite-- \Panes_Storage\
			$pane = tabset("save"); 
			if ($pane) {
				tabset("load", "z_switch");
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane;
				copyitem $pane_storage, $pane;
				tabset("load", $pane);
			}
		}
	}
I'll take a closer inspection on what you've shared as soon as time permits, thank you very much.
I'm back.
Written the code into a SingleScript.xys file placed under xy folder/Scripts, which is hooked to a generic load SingleScript command, ready under 'Run Script Again...". When asked, it throws me a "does not contain any valid lines" output. What am I doing wrong here?

bossi
Posts: 144
Joined: 30 Jul 2022 11:09
Location: Win11-latest, XYx64 latest, 4K@100%

Re: A Wiser Restart Without Saving, please

Post by bossi »

henlo , i just gave you a function , for it to work you must include sth like :

Code: Select all

$sel = popupmenu("change|store|store_as|restore");
if $sel{
    TABSET_($sel)
}
so you see a menu , select what to do , the function gets executed with that argument ...

also for "restore" to work you must manually create "z_switch" as a dummy tabset in the \Panes\ folder .

bossi
Posts: 144
Joined: 30 Jul 2022 11:09
Location: Win11-latest, XYx64 latest, 4K@100%

Re: A Wiser Restart Without Saving, please

Post by bossi »

Code: Select all


	function TABSET_($sel){

		if $sel == "change"{ // loads tabset from \Panes\
			$list = listfolder("<xydata>\Panes", "*", 2);
			$listn = replace($list, "<xydata>\Panes\");
			$s = popupmenu($listn);			
			if $s{
				tabset("load", $s);
			}			
		}
		if $sel == "store"{ // stores tabset into \Panes_Storage\
			$pane = tabset("save");
			if ($pane) {
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane_storage;
				copyitem $pane, $pane_storage;
			}
		}
		if $sel == "store_as"{  // stores tabset into \Panes_Storage\ under new name
			$input = input();			
			$pane = tabset("save");  
			if ($input) {
				$destination = "<xydata>\Panes\" . $input;
				$destination_storage = "<xydata>\Panes_Storage\" . $input;
				copyitem $pane, $destination;
				copyitem $pane, $destination_storage;
				tabset("load", $destination);
			}
		}
		if $sel == "restore"{ // restores tabset from \Panes_Storage\  
			// \Panes\ <--overwrite-- \Panes_Storage\
			$pane = tabset("save"); 
			if ($pane) {
				tabset("load", "z_switch");
				$pane_storage = replace($pane , "\Panes\" ,"\Panes_Storage\");
				delete ,, $pane;
				copyitem $pane_storage, $pane;
				tabset("load", $pane);
			}
		}
	}

$sel = popupmenu("change|store|store_as|restore");
if $sel{
    TABSET_($sel)
}

just indenrt it properly

admin
Site Admin
Posts: 64828
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: A Wiser Restart Without Saving, please

Post by admin »

In the next beta you can do savesettings 4096; to save just the tabs of both panes and nothing else.

Slideshow BoB
Posts: 41
Joined: 03 Apr 2024 18:46

Re: A Wiser Restart Without Saving, please

Post by Slideshow BoB »

Now I see how you designed it, bossi.
Only thing is: this is too much demanding when I ask for is just a simple way for XYplorer to either keep or restore current session when a quick reload is needed. I GUESS I can rewrite/recombine it in that fashion.

-saving current set under a predefined name (will I be able to detect single or dual pane? Not sure);
-invoking 'restart without saving';
-(MAJOR POTENTIAL ISSUE) is there a way the previous routine predefine a 'load' set of commands thus restoring saved session...? I'm also trying to avoid any permanent changes to the default launch set of tabs, which is also making me quit on my own devices.

EDIT:
admin wrote: 12 Oct 2025 19:41 Re: A Wiser Restart Without Saving, please
by admin » 12 Oct 2025 14:41

In the next beta you can do savesettings 4096; to save just the tabs of both panes and nothing else.
:warnred20:
...this may be of help! Thanks, admin!!!

Post Reply