Session Manager [v6.60]

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

Re: Session Manager [v2.6b7]

Post by FluxTorpedoe » 10 Jul 2014 15:08

At least 1 :bug: confirmed after a quick try with v14.30.

The culprit is a change of behavior of getkey(), between v14.20.0306 and v14.20.0314.

Previously a getkey("", "Section", "INIfile") would returned the name of the first key of the section (thus confirming the existence of this section); not anymore.

e.g. previously, this:
msg getkey("", "General");
would return:
LastVer

Now, it returns nothing.

I'd rather wait for Don input before trying to alter the script... ;)

oblivion
Posts: 112
Joined: 13 Apr 2011 11:35

Re: Session Manager [v2.6b7]

Post by oblivion » 11 Jul 2014 23:18

FluxTorpedoe wrote:I'd rather wait for Don input before trying to alter the script... ;)
I may sob quietly to myself for a while, if that's okay? (Session Manager has been my only means of managing my environment since you first told me about it, and it not working properly has caused me much sadness :(
-- bests, Tim

...This space unintentionally left blank.

admin
Site Admin
Posts: 48972
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Session Manager [v2.6b7]

Post by admin » 12 Jul 2014 09:12

FluxTorpedoe wrote:At least 1 :bug: confirmed after a quick try with v14.30.

The culprit is a change of behavior of getkey(), between v14.20.0306 and v14.20.0314.
Wow, fascinating. I learned something through this that's totally unknown. Secret geek knowledge.

Next version will work as you expected.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

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

Re: Session Manager [v2.6b7]

Post by Filehero » 12 Jul 2014 09:18

admin wrote:Next version will work as you expected.
:ball: :ball: :ball: :ball: :ball: :ball: :ball: : :bug:

admin
Site Admin
Posts: 48972
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Session Manager [v2.6b7]

Post by admin » 12 Jul 2014 09:56

:biggrin:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

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

Re: Session Manager [v2.6b7]

Post by FluxTorpedoe » 12 Jul 2014 17:12

admin wrote:
FluxTorpedoe wrote:At least 1 :bug: confirmed after a quick try with v14.30.

The culprit is a change of behavior of getkey(), between v14.20.0306 and v14.20.0314.
Wow, fascinating. I learned something through this that's totally unknown. Secret geek knowledge.

Next version will work as you expected.
:ninja:
:biggrin:

Thanks! & Viel Glück für morgen! :beer: ...

bert.lloyd
Posts: 5
Joined: 05 Oct 2013 02:57

Re: Session Manager [v2.6b7]

Post by bert.lloyd » 03 Sep 2014 16:20

Hi, I'd like to know if it's possible to choose a session when starting XYplorer from the command line.

That is, I have some simple batch files that start up various programs, with settings depending on the project I'm working on at the time. Currently, I start XYplorer just in a generic way:

XYplorer.exe /win=normal

but I would like to start up with a particular session loaded.

Any ideas on how to do this?

I see from the help page on command line switches that it's possible to run scripts on startup, so an alternative question would be how to write a simple script to choose a particular session.

Thanks very much,

BL

autocart
Posts: 833
Joined: 26 Sep 2013 15:22

Re: Session Manager [v2.6b7]

Post by autocart » 03 Sep 2014 17:45

bert.lloyd wrote:...so an alternative question would be how to write a simple script to choose a particular session.

Thanks very much,

BL
I would like that option to be available too.
Regards, Stephan

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

Re: Session Manager [v2.6b7]

Post by FluxTorpedoe » 04 Sep 2014 16:10

Hi'

Been so busy that I forgot to post the latest version from April... :oops: which makes your wish possible !

:arrow: To startup XYplorer with a particular session loaded
— Create a shortcut to XYplorer, edit its properties, and append the following to the "Target" field:

Code: Select all

 /new /script="::global $DYN_InpSess; $DYN_InpSess='Name Of Session'; load 'SessionManager.xys', '_Load';"
(Obviously, replace 'Name Of Session' with the name of the session you want to load on startup.)

---------------------------

So here's the latest version.
Among other things, autorun of script on session load has been enhanced, so here's the correct entry for SessionManager Missing Manual:

:arrow: Define a script to run when a specific session is loaded
Add a script to a session in Options > Associate Script with Current Session.
Behavior is like in AddressBar: either load an external script file, or directly type your script (after "::")
=> When loading the session, your script (quick script, script file, or label in script file) will be run. Possibilities are limitless: you can use the script to run apps or AutoHotkey scripts, change catalogs, etc...
Sessions with a script to Run will be marked with a "®" suffix.

Hope you enjoy it ! 8)
Flux

---------------------------

Session Manager v2.71 - Changelog
+ 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
Attachments
SessionManager.xys
(89.54 KiB) Downloaded 91 times

bert.lloyd
Posts: 5
Joined: 05 Oct 2013 02:57

Re: Session Manager [v2.71]

Post by bert.lloyd » 04 Sep 2014 18:26

This looks great, thanks so much for being so responsive.

A quick, dumb question: how should I upgrade SM without losing the sessions I have saved currently?

Never mind, figured it out. In case others were wondering, you just overwrite the previous SessionManager.xys in /Scripts with the new one. Leave SessionManager.ini alone and the new version of Session Manager will find your data in the /Panes folder.

And: the suggested command line works great in scripts, I'm able to fire up XYplorer with whatever session I want. Really, truly excellent.

Thanks,

BL
Last edited by bert.lloyd on 05 Sep 2014 16:04, edited 1 time in total.

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

Re: Session Manager [v2.71]

Post by klownboy » 04 Sep 2014 19:37

A very big thanks from me also Flux. Nice update. :appl: It does seem much faster at loading and maybe today's beta which optimized "replace" is also helping. It appears to be remembering the pane divide locations when Dual pane is used on multiple sessions/layouts. I was having some issues with that previously.
Thanks,
Ken

EDIT: No, it appears the pane divider location is not being save across XY sessions (i.e., exiting and reloading XY) even when the "session" is saved with layout. Is that pane divider location even savable? Not a huge deal, but I have different dual pane setups some vertical and some horizontal. The vertical one is offset quite a bit such that pane 1 is a narrow custom column view and the other, pane 2 is the same folder but thumbnail view. It seems after a reload of XY, its back to where both panes have equal real estate.

SammaySarkar
Posts: 4235
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Session Manager [v2.71]

Post by SammaySarkar » 04 Sep 2014 20:20

"Save Session As"
2014-09-05_001425.png
2014-09-05_001425.png (9.63 KiB) Viewed 1861 times
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Session Manager [v2.71]

Post by FluxTorpedoe » 05 Sep 2014 18:11

@all
Thanks. :)

@bert.lloyd
Yep, you guessed right, personal data (list of sessions, settings, etc.) is stored in "SessionManager.ini" (or more precisely, an ini file with the same basename as the SessionManager script in case it's been renamed).

@Ken
No wonder the pane divider location isn't remembered: it's a (relatively) new feature introduced with the new set of layout() commands ; and everything was done "manually" in SessionManager... Be assured that I definitely intend to update it!
Because of this, there will be a huge purge of code... which will be muchhhhhhhh simpler to implement!!! ;)
But still, I have to do it and torture-test it... And since this will introduce XY recent version requirements, I'll also take this opportunity to remove bits of legacy code (needed to debug old quirks/versions of XYplorer) — so I'll do my best, but you may have to wait a bit...

@SammaySarkar
??? Weird!!! The save dialog is just a basic input() with no options...
Did this occur with previous versions of SM? And do this occur all the time / also with the save of regular sessions (not temporary)?
Could you please run this script by itself and tell me if you experience the same issue?

Code: Select all

	$InpSess = input("Save & Use session<crlf>You're currently using session:  DEBUG  ", "<crlf>
		Enter the name of the tabsets session to save.    <crlf>
		This session will be in use after you press OK.    <crlf 2>
		• The name has to be a valid filename, and can not contain '[' or ']'.    <crlf 2>
		• To save a session with its layout, add a question mark '?' before its name.<crlf>
		- Ex1:       My Session     -->     Save  'My Session'  without layout.<crlf>
		- Ex2:     ?My Session     -->     Save  'My Session'  with layout.<crlf 2>
		Note: Layouts can be saved later in menu Layout Tools  >  Save/Update Layout of Current Session  <crlf>
		", , , "§CANCEL§");
[/size]

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

Re: Session Manager [v2.71]

Post by klownboy » 05 Sep 2014 19:21

Hey Flux, I noticed that the layout text files have the pane widths and heights. I can see why layouts will really simplify Session Manager in many ways but it will be quite an overhaul to the script. In the end though, it will quite worth it...getting Session Manager up to date with the latest XY has to offer. It's a good, well used by many script. Thanks again.

SammaySarkar
Posts: 4235
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Session Manager [v2.71]

Post by SammaySarkar » 05 Sep 2014 21:11

FluxTorpedoe wrote:@SammaySarkar
??? Weird!!! The save dialog is just a basic input() with no options...
Keep your shirt on. It's just a bug: http://www.xyplorer.com/xyfc/viewtopic.php?f=2&t=12449 8)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply