Session Manager [v6.50]

Discuss and share scripts and script files...
Post Reply
FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

Session Manager [v6.50]

Post by FluxTorpedoe » 05 Oct 2012 14:58


• DOWNLOAD:

   — Latest version: Session Manager v6.50 — Updated 2019-08-28
   — Changelog and previous versions: Session Manager Changelog

———————————————————————————


   Hi'

For those who work with different types of media (documents, pictures, music...) and/or with several sets of folders (tabs or tabsets), here's a "Session Manager" to streamline your workflow.

❖ Whether you work in Single Pane, Dual Pane or both, with it you can easily define and switch between "work environments" or "sessions", which remember the content you’re working with, and the way it’s displayed.
   ☛ E.g. in two clicks, you could switch between:
      — "Work": Windowed XYplorer focused on "My Documents" and "This PC" in details view, dual pane with tree and catalog; and
      — "Photos": Maximized XYplorer opened in "My Pictures" and displaying WallOfPictures thumbails along with a large preview, in single pane with no tree, no tabs, no menu, and address bar collapsed with toolbar.


———————————————————————————

• OVERVIEW:

❖ A session remembers the content of each pane and the way it’s displayed.
(The content of a pane —each tab’s location, etc.— is called a tabset. Sessions remember the tabset of both panes, even if one is hidden or not used.)
   ☛ To save a session: click on Session Manager’s button, then "Save Session as..."

❖ A layout session can also remember the whole layout of XYplorer, i.e. the way you’ve changed the interface (Single or Dual pane, visibility of the tree, catalog, preview... —anything in XY’s "Window" menu! (and more…))
   ☛ To add a layout to a session: click on Session Manager’s button, then "Layout Tools > Save Layout of Current Session"

❖ Sessions can also remember some extra features.
   Regular sessions can remember the state of visibility of Hidden (or System,...) files and folders
   Layout sessions can remember the state of syncing between panes (Sync Browse, Sync Scroll), and the thumbnails configuration (e.g. regular thumbs with large border for one session, or WallOfPictures enlarged with no padding for another...).
   ☛ To enable these features: click on Session Manager’s button, then "Options > General: Enable Extras..."
        All the extra features will be saved automatically with their session (each time you save or update a session).

❖ Additionally, sessions can be associated with a script (which will launch each time the session is opened); and sessions can remember the state of XYplorer’s toolbar (so you can have dedicated Custom Toolbar Buttons associated with specific sessions).
   ☛ To associate a script: click on Session Manager’s button, then "Options > Associate Script..."
   ☛ To save a toolbar: click on Session Manager’s button, then "Layout Tools > Save Toolbar..."
SessionManager.png
SessionManager.png (12.69 KiB) Viewed 8711 times
Usual disclaimer: 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! And big thanks also to the community.

Enjoy! 8)

Flux


———————————————————————————
###################
###    Installation   ###
###################


Download the script (link above) and copy it into XYplorer scripts folder: <xyscripts> , then either:
1. add    load "SessionManager.xys";    to "On left click:" of your custom button, or

2. use the following snippet:
   a) Paste    ::snippet;    into the address bar and press ENTER. A text box will open.
   b) Paste the following and press OK. A new button will be created at the right end of your toolbar.

Code: Select all

Snip: CTB 1
  XYplorer 11.60.0207, 05.10.2012 17:30:00
Action
  NewUserButton
Name
  Session Manager [Ctrl: Switch - Alt: Reset - Shift: QuickSave - C+A: LayoutReset - A+S: LoadFavorite]
Icon
  :tabsets
ScriptL
  load "SessionManager.xys";
ScriptR
  
FireClick
  1
———————————————————————————
### Extras ###
- The main "starcase" icon used in the screenshot is by kunkel321. You can get it here: Starcase Icon


———————————————————————————
### Old post - Work In Progress ###

Notes:
- 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.

Misc:
- 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.
—————————
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!
—————————

version 1.02:
SessionManager.xys
(20.82 KiB) Downloaded 722 times
Last edited by FluxTorpedoe on 03 Sep 2019 15:34, edited 49 times in total.

FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

• Session Manager Changelog •

Post by FluxTorpedoe » 05 Oct 2012 15:00

 
• CHANGELOG:

v6.50 — 2019-08-28Download here
+++ Editable mouse modifiers
      Info: Clicking on Session Manager toolbar button while pressing mouse modifiers (Ctrl, Alt, Shift) will run a specific command,
      e.g. Switch between the last two sessions; Reset session; Reset layout to default, etc.
      Access via Session Manager menu: Options > Edit Mouse Modifiers (Used When Clicking On Session Manager Button)...
      Note: The tooltip of Session Manager toolbar button is updated automatically
++ Added menu entry (which opens a dialog with info) to set/unset current session as a the favorite
      Info: Setting a session as the favorite enables you to load it externally (via mouse modifiers, CKS, Catalog, scripts...)
      Note: command was previously only available via mouse modifiers or external access
      Access via Session Manager menu: Options > Set/Unset Current Session As The Favorite
* Favorite session now always unindented in list to help identification
- Removed default mouse modifier for "Set current session as the favorite" (previously Ctrl+Alt+Shift)
+ External access to Update command: load "SessionManager.xys", "_Update";
* Reorganized and updated Cheat sheet with full list of all external commands
      Access via Session Manager menu: Options > Help: Cheat Sheet
* Streamlined menu Layout Tools
      Renamed "Use Layouts" to "Use Session Layouts"
      All generic (non-session) layout options now always available
      Reintroduced menu info when layouts disabled or using non-layout session
* Slightly optimized menu display speed

v6.20 — 2019-05-11Download here Minimum requirements: XYplorer ≥ 19.90.0106
+ DarkMode state is saved with layouts when Extras enabled (Options > General: Enable Autosave of Extra Settings...)
* Options: renamed (shortened) Extra Settings entry, and added confirmation dialog which displays more info
* Optimized Options menu code (less lines)
! Fixed bug when wrong toolbar button name was updated

v6.10 — 2019-04-09 (internal)
+ Icons: added ability to select icon from list of XYplorer's internal icons
* Icons: streamlined icon management (add/remove) in single dialog
+ Alt+Ctrl on button > Reset layout to default
      Note: load favorite session remapped to Alt+Shift

v6.00 — 2019-01-09Download here
++ Automatically save/restore catalog association with layouts (enable in Options menu)
      Note: active catalog is automatically associated with Default Layout when option is enabled
      Note: existing layout sessions must be manually updated in order to remember their associated catalog

v5.90 — 2018-11-11 (internal)
++ Automatically save/restore XYplorer window position and size with layouts (enable in Options menu)
      Note: active window settings are automatically added to Default Layout when option is enabled
      Note: existing layout sessions must be manually updated in order to remember their window position and size
+ Option to manually save or reset default XYplorer window position and size (in Layout Tools menu)
* Slightly reorganized Layout Tools menu to accommodate Xyplorer window-related options

v5.81 — 2018-10-10 (internal)
! Added safeguards to disable external commands (e.g. Reset) when no active or valid session

v5.80 — 2018-10-01Download here
++ Layouts - Alternate layout available (independent of sessions)
+ Easily switch between Default and Alternate layouts via keyboard shortcut... (cf Cheat Sheet)
++ Noticeably optimized code to display main menu (by delaying Cheat Sheet language computation!)
+ Enhanced Temporary Session management/display
+ Clicking on About cleans-up Session Manager layout entries (removes entries now managed by XYplorer)
+ Icon assigned to temporary session (if icons are used)
* Button icon is updated earlier, faster/cleaner transition
* Menu - Main menu order: reverted to Reset before Update
* Menu - Regrouped Autosave action (re/set and enable/disable) in Options menu to clean main menu
* Menu - Reordered layout menu
* Menu - Removed Reduce Flickering option (obsolete, now XYplorer’s default since a few years)
* Some extras settings are not saved anymore when Extras not used
! Button icon not reset when saving Temporary session from session with icon
! Language inconsistencies

v5.73 — 2018-09-25Download Here
* Ability to associate script with session doesn’t require Extras enable anymore
* Ability to save toolbar with layout doesn’t require Extras enable anymore
   Reason: Script and Toolbar require manual input anyway (to associate/save, update...)
   Whereas Extras only enable features that will be saved automatically
      — with any kind of session (visibility state of Hidden/System/Protected items)
      — and with layout sessions (Sync Browse, Sync Scroll, Thumbnails configuration)
* Reset and Update (main menu first two entries) haved been switched with Update first
* Layout sessions with a saved toolbar now have enhanced Update and Reset menu entries,
   now it’s clear that updating such a session will update the session and its layout including its toolbar
* Layout menu has been further reorganized (plus, it’s always the same, whether or not Extras are enabled)
* Layout sessions are now always prefixed with   ·   (regardless of only layout sessions available, and/or no use of icons)
* Further enhanced CTB autodetection/management
! Active session could incorrectly be available for deletion in case of layout session with toolbar and autosave

v5.72 — 2018-09-18 (internal)
+ Clicking on About also resets CTB icon if needed (e.g. invalid session caused by manual tabset loading)
* Replaced all real ellipsis characters by three dots "..." (presumably more universally compliant)
! Greyed out some options when no session (or not enough sessions) available

v5.71 — 2018-09-12 (internal)
++ Thumbnails configuration can now be saved with layout (when Options > Extras are enabled)
+ Clicking on About does a silent cleanup of all invalid session entries
   (in case tabsets have been externally changed)
+ CTB name uses language file to display [mouse modifiers]
+ Clicking on About also resets/updates CTB full name (Session Manager [Modifiers...])
* Further enhanced CTB reset/update management
! Some Extras layout features not always reverting to last/default when leaving layout session

v5.50 — 2018-09-10 (internal)
++ XY's maximized state is now saved with layout (windowed state is restored on session change)
+ Added layout entry to reset layout (of a layout session) to its original saved state
+ Added option Go to tabsets folder
* Reordered entries in layout menu
! Mouse modifiers (Quick control) now only react if click on SM button
! Toolbar not always loaded/autoreset when switching sessions
! Deletion of sessions with associated toolbar and/or script not working correctly

v5.40 — 2018-06-27 (internal)
* Enhanced CTB management

v5.35 — 2018-02-27 (internal)
* Enhanced CTB

v5.30 — 2017-12-29 (internal)
++ Session Manager CTB icon (custom toolbar button) changes according to active session icon (when available)

v5.2 — 2017-03-15Download Here Minimum requirements: XYplorer ≥ 17.50.0211
! State of SyncBrowse/Scroll is now (re)activated correctly for matching sessions.
   Note: These states (Panes > Sync Browse / Sync Scroll) are only remembered:
   › for sessions with layout;
   › with layouts enabled (Layout Tools > Use Layouts: ON);
   › if Options > General: Enable Extras…SyncBrowseScroll… is checked.
   When switching to regular sessions, these states are reset to default (the states saved, if any, with your default layout — Layout Tools > Save/Update Default Layout).
* Slightly changed entry Options > General:Enable Extras… by reordering it and adding "Layout" before SyncBrowseScroll
(Note to translators, too minor a change to update now, we’ll wait for next update).

v5.1 — 2017-03-11
+++ Quick load dialog (assigned to shortcut): type the first meaningful letter(s) of a session name to open it, or just "Enter" to switch to previous session (Details in Menu "Options" > "Help: Cheat Sheet...").
++ Sessions can now remember visibility status of Hidden/System/Protected files (check menu "Options" > "General: Enable Extras...")
+ Menus "Layout Tools" and "Options" are now real "popup" menus
+ Added new entry "Save Auto-Named Quick Session..." in menu "Options" (previously only accessible via Shift+Click on SM toolbar icon)
* List of commands for quick control of Session Manager are now regrouped in (and renamed as) "Help: Cheat sheet..." in menu "Options"
* Reordered and renamed some entries of menu "Options"
* Quick Sessions: added year to date prefix (yy-mm-dd * instead of mm-dd *), better readability
* Changed suffix of sessions with script from ® to °
- removed saving of elevated state with Extras (too cumbersome)
! Delete dialog displayed wrong text when only two sessions available
! Enhanced strict syntax checking compliance

v4.53 — 2016-03-12 (internal)
++ Sessions now also remember visibility status of Hidden/System files
! On rename of ordered session _with autosave_, ordered position was lost
! On rename of session with icon, icon wasn't reassigned
! On session delete, potential metadata entry (icon) wasn’t deleted from INI

v4.51 — 2015-12-26Download Here Minimum requirements: XYplorer ≥ 15.00.0518
* Decreased size (and visibility) of bullet prefix used to distinguish layout sessions (when using icons)
+ Removed bullet prefix when all sessions are layout sessions
* Fixed wrong modifier name in "Options>Display commands…"
* Fixed unwanted creation of a non-existing (blank) AutoSave session when using only regular tabsets (no session) and AutoSave active

v4.5 — 2015-12-24
+++ Quick control (mouse modifiers)
   Press modifier (Ctrl/Shift/Alt) while clicking on Session Manager button for instant action (bypass menu).
   — Click and:
       Ctrl = Toggle between last two sessions
       Alt = Reset current session
       Shift = AutoSave Quick Session
       Alt+Ctrl = Load favorite session
       Ctrl+Alt+Shift = Set current session as favorite
   — Codes available for quick control through CKS/UDC/Catalog…
   — List of modifiers and codes available in "Options > Display commands…"
+++ Quick sessions
   Instant save (no dialog) of current session, autonamed with date and active tab.
   Currently only available via Shift+Click on SM button, or via CKS/UDC…
+++ Use icons
   Options > Change Icons of Sessions…: Assign specific icons to sessions
* Main menu: Enhanced visual listing of sessions. All session names —except active session— are now indented.
+ Main menu: Enhanced listing of sessions (when available). Standard ordered sessions first, then standard unordered sessions, then quick sessions, then temporary session
+ Main menu: Added auto-separator between list of standard ordered sessions, unordered sessions, quick sessions, and temporary session
+ Options > Reorder list of sessions: Enhanched. Now, empty line added between previously ordered sessions and rest of unordered sessions (standard and quick sessions, listed alphabetically)
* Main menu: Changed sessions identification/iconification
   — If icons are in use, layout sessions are now prefixed with "•" (and don’t have specific icon anymore)
   — The active session —regular or with layout— is now identified with a new default “checked” icon
   — Retrocompatibility: The active session can still use the previous custom icons, only if default and layout icons exist in XYplorer "Icons" subfolder (<xyicons>). (e.g. with SessionManager.xys: Data\Icons\SessionManager.ico AND Data\Icons\SessionManager_Layout.ico)
* Autosave is now ON on fresh installs (too good to be missed!)

v4.b1 — 2015-09-24Download Here
*** Fully strict scripting compliant (Menu "Scripting" > "Syntax Checking")
* Temporary Session is now always listed last, also in "Delete" Menu
! Fixed misbehavior when saving (regular or temporary) session just after enabling Autosave
* Changed behavior of "Reset Autosave of current session" just after enabling Autosave
! Alert not showing when saving session under existing name
* Clarified status info of all Temporary Session operations
* Renamed "– Autosave –" to "•• Autosave ••" in menu for better legibility (esp. if enabled for Temporary Session))

v4.a2 — 2015-08-18Download Here
+++ Multilingual support
+ Added automatic saving of SyncBrowse and SyncScroll to layout sessions (if Advanced Layout Tools ON)
+ Added Autosave support to Temporary Session
+ Added scripting support to Temporary Session
* Clarified Autosave reset/on/off behavior
! Various fixes (of unprobable situations)

v3.2 — 2015-06-23Download Here Minimum requirements: XYplorer ≥ 14.10.0104
+ Added a "Display Codes to Access Session Manager Externally" entry in Options menu
+ Added a "Display Separator Between List of Sessions and Rest of Menu" entry in Options menu
* Moved "About Current Session/Tabsets" entry at bottom of main menu when list of sessions on top

v3.1 — 2015-06-14Download Here
+ Added a "(Un)Hide XYplorer Main Menu" entry in options menu
* Renamed/reordered Autosave entries in main and options menus
* Re-introduced saving of active/inactive state of panes with layouts (had disappeared when switching to XY layout system)
* added more spaces before "—AutoSave—" session suffix for clarity

v3.0rc2 — 2014-10-19Download Here
+ Added option to display list of sessions on top
* Reordered list of options
* Cosmetic: Removed extra separator line •••• between session list and main menu

v3.0rc1 — 2014-10-14Download Here
+ Added option to enable or disable tree auto-optimization on session change
+ Added possibility to use own icons for active sessions w/ or w/o layouts
*! Rewrote "Reorder List of Sessions" code and fixed remaining rare bug
* Rearranged "Options" and "Layout Tools" menus, AutoSave entry…
! Fixed "Layouts: Activate Preview..." option
! Fixed extra feature of Toolbar saving with layout
* Set default of "Layouts: Activate Preview..." to ON for fresh installs
* Set default of "General: Enable Confirmation Dialog..." to OFF for fresh installs

v3.0b1 — 2014-09-08Download Here
*/+ Rewrote layout management, which now recalls position of separator of Panes, InfoPanel, Catalog, etc...
Note: status of "Show sort headers in all view" is still saved with layout (not included in XY default layouts)
* Removed code that managed compatibility with old versions of XYplorer
* Cleaned code

v2.71 — 2014-09-04Download Here
+ Added direct access to Load Specific Session/Reset Session/Reset Layout/Save Temp Session (info in script header)
+ Added autorun of quick script on session load
+ Included SortHeaders to saving of layouts
+ Included Breadcrumbs to saving of layouts
*** Optimized code for faster loading of main menu
*** Rewrote code for reordering list of sessions
* Changed most icons for more unified look
* Changed menu entries for Temporary sessions
! Bug fixes

v2.6b7 — 2014-02-02Download Here
+++ AutoSave active session
+++ Associate scripts with sessions
+ Added possibility to save temporary session layout
* Cosmetic and lexical changes

v2.6b5 — 2014-01-22Download Here
+ Included SortHeaders to saving of layouts
+ Included Breadcrumbs to saving of layouts
+ Added (clearer) direct access to Reset Session/Reset Layout/Save Temp Session (details in script header)
*** Rewrote code for reordering list of sessions
* Changed most icons for more unified look
* Changed menu entries for Temporary sessions

v2.6b4 — 2013-06-18Download Here
* Relocated the entry "Layout loading: ON/OFF" from main menu to "Layout Tools" submenu. Reason: with the new possibility to reorder sessions with separators, the main menu was getting too crowded.
* Rename the "Temporary Session" without its weird ¤ signs
* Enhanced icon auto-selection for active session with layout
* Enhanced icon auto-selection for layouts and for inactive sessions with layout, in anticipation of Win7/Win8 (couldn't test yet under Win7)
! Fixed the new "Reorder List of Sessions" function, with newly added sessions possibly not visible
! Fixed half-toggling of NavigationPanel/Tree/Catalog, when switching between sessions with layouts, in very rare conditions.

v2.6b1 — 2013-05-19Download Here
+ Added a "Temporary Session"
+ Added ability to reorder sessions list

v2.5b2 — 2013-03-17Download Here
! Fixed some broken icon(s) since v2.5b1 Win7-Fix
! Fixed catalog above/below tree for sessions with layout (while keeping things smooth - tricky one!)

v2.5b1 — 2013-02-21Download Here
! Fixed missing active session and menus under Win7
* Streamlined code to use "_Initialize"
+ Abused said code, so SM subscripts can now be called directly

v2.5a2 — 2012-12-10Download Here
+++ Layout Extras
   A layout Extra is the state of the content of some of XYplorer's interface elements (Toolbar buttons, Catalog, Tags, PortableFileAssociations)

v2.0a1 — 2012-10-13 (internal)
+++ Sessions can now be saved with a layout
   A Layout is the state of the interface of XYplorer (Visibility of: Single/Dual Pane; Navigation Panel; Tree; Catalog; Toolbar; Addressbar; Tabbar; Menu; Info Panel)

v1.02 — 2012-10-21Download Here
! 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.)

v1.00 — 2012-10-19
* 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.

v0.97 — 2012-10-12
+ 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.

v0.96 — 2012-10-09
+ 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..."

v0.95 — 2012-10-07
! 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.

v0.93 — 2012-10-06
* Removed dependency on script name. Now you can rename the script and even move it elsewhere (e.g. <xyscripts>\Extras\SessMngr.xys)

v0.92 — 2012-10-06
+ 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).

v0.91 — 2012-10-05
* Cosmetic. Removed "..." after session name in "Load Menu".

v0.90 — 2012-10-05
Public release

v0.0 ~ 2012-01-01 (internal)
Initial development
Last edited by FluxTorpedoe on 03 Sep 2019 15:15, edited 41 times in total.

kunkel321
Posts: 569
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 » 06 Oct 2012 05:12

Wow that's awesome! Thanks so much for making and posting this.
It's far far beyond my scripting abilities, but it worked first try. :biggrin:

I was just thinking about how to save dual-pane bookmarks--this certainly does the trick.

Not sure if you're taking feature requests... But maybe have the names of the profiles in the main popup menu, with an arrow ">" pointing to which ever is the currently set one... I guess this would require the script to change as new profiles were added (?) But you must be writing to an INI anyway...
ste(phen|ve) kunkel

FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe » 06 Oct 2012 05:46

Glad you found it useful! :D
maybe have the names of the profiles in the main popup menu, with an arrow ">" pointing to which ever is the currently set one...
You mean like having the Load Menu, with the names of all your sessions, integrated in the Main Menu below the "About"?
That may be an interesting... but weird idea! :wink:
Because the cost to save one click would be to have the Main Menu quite crowded, which would render things confusing especially for those who already have it in another custom button. Or did you mean something else?

EDIT: And no, the script is currently self-contained (no INI or extra files).

FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe » 06 Oct 2012 09:09

Well, I couldn't help but give it a go... & I kinda like it! :biggrin:

This meant I had to switch to an xys script file, so it cannot be integrated to an already existing customized menu anymore (I guess).

I tried the ">" and indentation to mark the active session, which was ok, but then I remembered that Filehero had used star icons in its LayoutManager. So I took the liberty to borrow his idea, and it looks much better! :wink: . Well, it looks dirtier in my case because this icon (like the others) is drawn from the system shell. It's probably quite different under Win7.
SessionManager(Int).jpg
SessionManager(Int).jpg (25.64 KiB) Viewed 11757 times
Note: A session is "starred" (marked as loaded) only if it's a valid session (both tabsets in their right pane).

To use this version, first, copy the following file into XYplorer scripts folder: <xyscripts> ,
SessionManager.xys
(15.08 KiB) Downloaded 398 times
then either:
1. add load "SessionManager.xys"; to your custom button, or
2. use the following snippet:

Code: Select all

Snip: CTB 1
  XYplorer 11.60.0207, 05.10.2012 17:30:00
Action
  NewUserButton
Name
  Session Manager
Icon
  :tabsets
ScriptL
  load "SessionManager.xys";
ScriptR
  
FireClick
  1
[/size]
I'll wait till it's "validated" enough to update the first post.

Enjoy! 8)

FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe » 06 Oct 2012 11:15

====================
Session Manager v0.93 / Alternate
====================

Changelog:
v0.93

* Removed dependency on script name. Now you can rename the script and even move it elsewhere (e.g. <xyscripts>\Extras\SessMngr.xys)

I'll wait till it's "validated" enough to update the first post.
Attachments
SessionManager.xys
(15.06 KiB) Downloaded 384 times

klownboy
Posts: 2804
Joined: 28 Feb 2012 19:27

Re: Session Manager [v0.91]

Post by klownboy » 06 Oct 2012 17:52

Hey FluxTorpedoe, great idea! I loaded your latest posted version 0.93 and received the XY message "No session found to load". Obviously, my first time loading the script and then on subsequent clicks but I never got the menu to load. I made a screen clip, but I figured it wouldn't be necessary to send it along. I had assigned the script to a TB button. I then loaded the original posted version (0.91) and it did work. I figured I'd pass that on.
Thanks and again, great idea,
Ken

Filehero
Posts: 2297
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Session Manager [v0.91]

Post by Filehero » 06 Oct 2012 18:45

Hi,

yep, a great idea.

I have an experimental - and less sophisticated - version of tab storage implemented in my LayoutManager for quite a long time but never dared to release it since tab sessions aren't really related to layouts. So, I'm happy that someone else started to take care of that. :)

If I find some time tomorrow I'm gonna give it a try.


Cheers,
Filehero

kunkel321
Posts: 569
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 » 06 Oct 2012 18:55

Awesome thanks! 091 seems to work here....
Image

I haven't tried the self-creating one... I just put a User Button on my toolbar and made the On-Click cmd = Load "your file in my script folder"

Note that newly created (saved) Sessions didn't show up in the list until I restarted XYplorer...

The little star is better than the ">" :biggrin: I think it's a nice feature, because if a person goes to do a 'Session Update' they'll first get a quick reminder of which profile is about to be over-written.
ste(phen|ve) kunkel

kunkel321
Posts: 569
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 » 06 Oct 2012 19:00

Sorry, I meant the above is v0.93, not 91! (I'm putting this comment as a reply, because I've found that when I edit an existing post, it doesn't always show up.)

Also: I can try the more automated one if no one else does... I just don't want to mess up my setup by doing both versions...
ste(phen|ve) kunkel

FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe » 07 Oct 2012 04:51

@klownboy
I loaded your latest posted version 0.93 and received the XY message "No session found to load".
Dang! A remnant of the original design, thanks for pointing this out. Fixed in v0.95.

@kunkel321
The little star is better than the ">" I think it's a nice feature, because if a person goes to do a 'Session Update' they'll first get a quick reminder of which profile is about to be over-written.
Indeed...
In general, I so like the new 'integrated' method that I decided to make it the official one! 8) (I'll leave the previous available just in case, but no need to test it if you don't use it.)

@Filehero
For my personal needs, I'd made my "Session Manager" pretty soon after Don created the tabsets, so I was using it and didn't look further... But it was seeing your "LayoutManager" that gave me the incentive to share it! :biggrin:

FluxTorpedoe
Posts: 744
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.95]

Post by FluxTorpedoe » 07 Oct 2012 05:34

Note that newly created (saved) Sessions didn't show up in the list until I restarted XYplorer...
Can't repro here...
If you save a session e.g. "Test", the menu is closed, the status bar reads "Session 'Test' saved successfully", and this session is automatically 'active' behind the scenes (that's the way tabsets work). So if you click again on the SessionManager button, you should have the menu with session "Test" marked by a star.
There shouldn't be any relation nor need to close XY, because the sessions list is 'guessed' by directly reading the folders available from the "Panes" folder.

Please confirm, or if someone else can reproduce...

& BTW, any request is welcome! (as long as I can manage to get online :lol: )

klownboy
Posts: 2804
Joined: 28 Feb 2012 19:27

Re: Session Manager [v0.95]

Post by klownboy » 07 Oct 2012 16:24

Hey FluxTorpedoe, v.95 loaded like a charm. The first thing I did was to save my tabset configuration, or I should say Session, as "Original" (What an original idea!). I checked in the Panes sub folder and saw how the two panes were saved and also noticed that my pre-existing panes were still there in tack.

However, after performing some operations and I think I may have also did an update using Simple Updater (by serendipity) I noticed that all the icon for my tabs were a exclamation point triangle!!!! as if I had an improperly assigned icons (but mine were all fine at least initially). I don't know if this is because the script didn't save the configuration properly or I didn't "save all" at some point? I closed and reopened XY and the icons were still missing. I then clicked on my Session Manager Toolbar button and clicked on the my new "Original" session and the tab icons came back. Note: I do not have my configuration saving automatically. I'm not sure what happened there, but I figured I'd pass it on. I don't seem to be having a problem now after exiting and re-starting XY a number of times.

Separate question; when saving the current session (with the same name), is it best to use "session - update..." as oppose to "save session...". It seems that save session is more appropriate to save the existing configuration "session" with a new session name (i.e., a "save as" situation).
Thanks again,
Ken

kunkel321
Posts: 569
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 » 07 Oct 2012 19:26

My previous post wrote:Note that newly created (saved) Sessions didn't show up in the list until I restarted XYplorer...
Hmmm... I can't reproduce it either... Not sure what happened.
Interestingly, I tried a fresh copy of XYplorer, by making myself a "Program Files/XYtemp" folder, and copying xyplorer.exe into it (a tip I got from another forum member). This allows me to run a copy of XY that is as though it were just installed for the first time. Anyway, it creates its own scripts file so I put 093 in there and pointed a button to it (same setup as above). It doesn't launch at all... I just get an error message "No session found to load." Probably its a problem with my setup and not your script--I dunno... [edit] Note that I did save a TabSet in XY, expecting that the SesMan script would maybe read access it, and also I restarted my temp XY... No luck.

So I tried recreating the above problem by using my normal registered version of XY. Deleted all but one Session, then created a couple more... All of them showed up in the list immediately, as expected.
Last edited by kunkel321 on 07 Oct 2012 19:47, edited 1 time in total.
ste(phen|ve) kunkel

kunkel321
Posts: 569
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.95]

Post by kunkel321 » 07 Oct 2012 19:44

klownboy wrote:Separate question; when saving the current session (with the same name), is it best to use "session - update..." as oppose to "save session...". It seems that save session is more appropriate to save the existing configuration "session" with a new session name (i.e., a "save as" situation).
Hmm.. Good point. Not sure on this... klownboy has a good point though. Maybe the nomenclature should be

Session -- Reset...
Session -- Redefine Current...
--------------------------
- Save New Session
- etc

I dunno.
ste(phen|ve) kunkel

Post Reply