Page 11 of 35

Re: Session Manager [v2.6b7]

Posted: 10 Jul 2014 15:08
by FluxTorpedoe
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... ;)

Re: Session Manager [v2.6b7]

Posted: 11 Jul 2014 23:18
by oblivion
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 :(

Re: Session Manager [v2.6b7]

Posted: 12 Jul 2014 09:12
by admin
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.

Re: Session Manager [v2.6b7]

Posted: 12 Jul 2014 09:18
by Filehero
admin wrote:Next version will work as you expected.
:ball: :ball: :ball: :ball: :ball: :ball: :ball: : :bug:

Re: Session Manager [v2.6b7]

Posted: 12 Jul 2014 09:56
by admin
:biggrin:

Re: Session Manager [v2.6b7]

Posted: 12 Jul 2014 17:12
by FluxTorpedoe
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: ...

Re: Session Manager [v2.6b7]

Posted: 03 Sep 2014 16:20
by bert.lloyd
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

Re: Session Manager [v2.6b7]

Posted: 03 Sep 2014 17:45
by autocart
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

Re: Session Manager [v2.6b7]

Posted: 04 Sep 2014 16:10
by FluxTorpedoe
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

Re: Session Manager [v2.71]

Posted: 04 Sep 2014 18:26
by bert.lloyd
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

Re: Session Manager [v2.71]

Posted: 04 Sep 2014 19:37
by klownboy
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.

Re: Session Manager [v2.71]

Posted: 04 Sep 2014 20:20
by bdeshi
"Save Session As"
2014-09-05_001425.png
2014-09-05_001425.png (9.63 KiB) Viewed 5593 times

Re: Session Manager [v2.71]

Posted: 05 Sep 2014 18:11
by FluxTorpedoe
@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]

Re: Session Manager [v2.71]

Posted: 05 Sep 2014 19:21
by klownboy
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.

Re: Session Manager [v2.71]

Posted: 05 Sep 2014 21:11
by bdeshi
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)