Session Manager v1.02
- Updated 2012-11-10 -
For those who change their tabs frequently, here's a "Session Manager".
Whether you work in Single Pane, Dual Pane or both, with it you can easily define and switch between 'work environments' or 'sessions'.
A session being the general state of tabsets. (i.e. in both panes even if one is hidden or not used.)
Of course you can still use standard tabsets alone, combine them with sessions or use sessions only, and switch methods anytime depending on your needs.
- Each session is composed of two tabsets.
- When you save a new session, its two tabsets are automatically created with the name of the session, preceded by '§1§_' for pane 1 and '§2§_' for pane 2.
(e.g. Session 'Work' uses tabsets '§1§_Work' and '§2§_Work')
- A session is considered (i.e. 'shown as') valid, only when both tabsets are from the same session and in their right pane (e.g. tabset '§1§_Work' in Pane 1 and '§2§_Work' in Pane 2).
- A session is marked by a star icon (marked as active) only if it's a valid session.
- You can disable the confirmation dialog for Reset and Update in Menu "Configuration". Know that, even if disabled:
..."Session - Reset" ALWAYS asks for confirmation if a session isn't valid (but you can still reset your tabsets),
..."Session - Update" NEVER updates a non-valid session, and pops-up a warning instead.
- You can delete multiple sessions at once.
- You can't delete a session that is currently active (i.e. loaded even partially). To do so, just load another session before trying to delete.
- 80%+ of the code and work went into imagining the worst mix-ups (i.e. intentional crazy manipulations of tabsets), and implementing safeguards.
- This was executed after I decided to share my original script, which explains why the code's probably not the cleanest one.
- Anyway, there's no reason this script should cause any trouble. But as they say: it's provided as-is, so backup & be wary, blablabla...
Finally, I'd like to take this opportunity to thank Don for the amazing program that is XYplorer - it's been a while since I had that much fun with a soft
And thanks also to the community, but especially the "Club of the 4 digits posters". Your contributions were priceless to get up'n running with XY!
& fire up your comments...
### Installation ###
To use this script, first, copy the following file into XYplorer scripts folder: <xyscripts> ,
1. add load "SessionManager.xys"; to your custom button, or
2. use the following snippet (with Don's litteral instructions):
-a) Paste ::snippet; into the address bar and press ENTER. A text box will open to enter snippet.
-b) And here comes the copy+paste ready snippet. It will create a new button at the right end of your toolbar.
- Code: Select all
Snip: CTB 1
XYplorer 11.60.0207, 05.10.2012 17:30:00
### Extras ###
- The main "starcase" icon used in the screenshot is by kunkel321. You can get it here: Starcase Icon
### Session Manager v1.02 ###
! Fixed bug when sessions had same base name
! Fixed potential bug of weird menu behavior
* Changed Main Menu readability (unusable lines are grayed-out)
* Changed Delete Window readability (current session information, etc.)
* Changed the Delete action from dropdown menu to multi-selectable list
+ Added an option to always activate dual pane when opening sessions.
+ Added &Accelerator keys on all menus.
+ Added a link to Session Manager post in XYplorer forum.
+ Added "Configuration" entry to Main Menu,
... to easily change Confirmation setting for Reset and Update,
... and leave room for other potential options.
* Active session is now written in bold for a much better legibility.
+ Added tweak to remove confirmation dialog for "Reset" and "Update":
... $CONFIRMATION = 0; (in header of SessionManager.xys)
...Confirmation is ON (i.e. 1) by default (See Notes for more info)
* Renamed "Save Session..." to "Save Session as..."
! Fixed "No session found to load" when no session exists.
* The "About..." is now named "About Current Session" when a valid session is active (both tabsets in their right pane).
...Otherwise the "About..." is now named "About Current Tabsets", and is 'starred' to draw attention to the non-valid-session state.
* Removed dependency on script name. Now you can rename the script and even move it elsewhere (e.g. <xyscripts>\Extras\SessMngr.xys)
+ Integrated list of loadable sessions in "Main Menu".
- Removed "Load Menu".
* Changed script to XYS script file (needed for dynamic menu creation).
- Removed ability to integrate script to another menu (drawback of using a XYS).
* Cosmetic. Removed "..." after session name in "Load Menu".
// Version 0.91 still available in next post //