Session Manager [v7.00]  —  Bookmark your environments: locations and/or display (tabsets and layout)

Discuss and share scripts and script files...
oblivion
Posts: 142
Joined: 13 Apr 2011 11:35

Re: Session Manager [v3.0 RC 2]

Post by oblivion »

Not that you need my confirmation, but it's similarly broken here. :(

It's embedded itself so far into my workflow that I'm having to catch myself every time I try to use it.

I may have to try actual bribery. ;)
-- bests, Tim

...This space unintentionally left blank.

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

Re: Session Manager [v3.0 RC 2]

Post by klownboy »

oblivion wrote:I may have to try actual bribery.
I'll contribute to the bribe! :ninja:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Session Manager [v3.0 RC 2]

Post by bdeshi »

It's been broken since 15.00.301 when interpretation of ternary conditionals was slightly tweaked bugged (fixed in 15.00.403). Try this in pre-..0301 and ..301. Will return 'y' and 'n' resp.

Code: Select all

::echo ('a')?'y':'n';
And the script has a couple ternary statements where the condition only has the lefthand side, it's assumed that any value will return true. Now those statements need a full condition.

So here's a "patch".
Select pristine or not-extensively-modified sessionmanager.xys v3.0RC2 and run this patcher.[code] end !confirm("Warning: this is a blind patcher and does not check if selected file is supported" . <crlf 2><curitem><crlf 2> .
"Are you 100% sure this is a session manager v3.0RC2 script?");
//end (regexmatches(readfile(<curitem>),'\$GEN_SM_Version[^=;]*=[^"]*\"3\.0\sRC2\"') == ''),'Not correct SessionManager version';
$in = readfile(<curitem>);
$out = replace(
replace(
$in,
'$DYN_b_InpSessLay = (getkey("", "Layout ".$DYN_InpSessMaster, $GEN_Ini))? 1 : 0;',
'$DYN_b_InpSessLay = (getkey("", "Layout ".$DYN_InpSessMaster, $GEN_Ini) != "")? 1 : 0;',
),
'$PRE_CurSessLay = (getkey("", "Layout ".replace($PRE_CurSess, $GEN_AutoSaveSuffix), $GEN_Ini))? replace($PRE_CurSess, $GEN_AutoSaveSuffix) : "";',
'$PRE_CurSessLay = (getkey("", "Layout ".replace($PRE_CurSess, $GEN_AutoSaveSuffix), $GEN_Ini) != "")? replace($PRE_CurSess, $GEN_AutoSaveSuffix) : "";'
);
if ($in == $out) { end 1, "Sorry can't patch". <crlf> . "(string not found/nothing replaced)"; }
$out = replace($out,
'/* version 3.0 RC2 - 2014-10-19 */',
'/* version 3.0 RC2 patch 1 - 2015-04-17 */'. <crlf> . '/* patch 1: fix ternary conditionl bug' . <crlf> .
' http://www.xyplorer.com/xyfc/viewtopic. ... 82#p121882 */');
writefile(<curitem>, $out, 'o');[/code][/size]


or here's a boring patched xys: [unnecessary now]
Last edited by bdeshi on 18 Apr 2015 08:34, edited 2 times in total.
Reason: re-upload
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

calude
Posts: 355
Joined: 13 Aug 2008 10:16
Location: Switzerland
Contact:

Re: Session Manager [v3.0 RC 2]

Post by calude »

hi Sammay
I copied your "boring patched xys" to the script folder and now none of my sessions appear in the menu...
the ini still seems to contain my sessions but how do I "reload" my lost sessions?

Calude

edit: I used the patcher and everything is smooth and fine again

:appl: :appl: :tup: :tup:

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

Re: Session Manager [v3.0 RC 2]

Post by klownboy »

I used the patch instead. No issues and it seems to be back to its normal working state. Thanks once again Sammay. :appl:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Session Manager [v3.0 RC 2]

Post by PeterH »

Hey - did I miss something? Is there a reason for it?

Now 'A'?... is not true,
while If('A') is true.
So 'A' only sometimes is true :shock:

Seems wrong?

I think definition says 0 is false, else it's true. 'A' isn't 0. (See the "if"!)
Again: did I miss something? Or :bug: :?:

(To say: I rarely use ternary :P )
W7(x64) SP1 German
( +WXP SP3 )

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

Re: Session Manager [v3.0 RC 2]

Post by bdeshi »

Thanks! glad to help. :D
calude wrote:I copied your "boring patched xys" to the script folder and now none of my sessions appear in the menu...
hmm, that uploaded xys had wrong encoding. My text editor didn't/couldn't show some missing special characters. :oops: :oops:
Re-uploaded a fixed version.
PeterH wrote:Hey - did I miss something? Is there a reason for it?
Regardless of what's true and what's false, that snippet, ::echo ('a')?'y':'n'; , simply returns different echos when run in different XY versions, say 15.00.300 and 15.00.301
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Session Manager [v3.0 RC 2]

Post by admin »

PeterH wrote:Hey - did I miss something? Is there a reason for it?

Now 'A'?... is not true,
while If('A') is true.
So 'A' only sometimes is true :shock:

Seems wrong?

I think definition says 0 is false, else it's true. 'A' isn't 0. (See the "if"!)
Again: did I miss something? Or :bug: :?:

(To say: I rarely use ternary :P )
Yes, you are right, I created a bug there. Fix comes.

Actually there are 2 values that count as False: "" and 0.

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

Re: Session Manager [v3.0 RC 2]

Post by oblivion »

SammaySarkar wrote: Re-uploaded a fixed version.
Works perfectly here. Thanks! You have saved my sanity! :D

Now then: how do I get :beer: in an envelope? ;)
-- bests, Tim

...This space unintentionally left blank.

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

Re: Session Manager [v3.0 RC 2]

Post by klownboy »

SessionManager is back to working like a champ with XYplorer version beta version 15.00.0403 without the need for Sammay fix...for info only. Thanks Don, Sammay, Filehero and PeterH.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Session Manager [v3.0 RC 2]

Post by PeterH »

admin wrote:Actually there are 2 values that count as False: "" and 0.
Perfect! :appl:

Thanks :beer:
W7(x64) SP1 German
( +WXP SP3 )

Stef123

Re: Session Manager [v3.0 RC 2]

Post by Stef123 »

Icons are only visible when I choose the default order that lists sessions at the bottom. With Options > list sessions on top, the icons disappear.

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

Re: Session Manager [v3.0 RC 2]

Post by Filehero »

Stef123 wrote:Icons are only visible when I choose the default order that lists sessions at the bottom. With Options > list sessions on top, the icons disappear.
I had one session that reproducibly generated duplicated menu entries (and triggered some other strange behaviours). After deleting it everything seems ok now. However, the icons have been ok ever since the yesterday's update to 15.00.0404.

@Sammay, Don: thank for the fixes :D
@Ken: I contributed the "ticket" only. :mrgreen:


FH

Stef123

Re: Session Manager [v3.0 RC 2]

Post by Stef123 »

Filehero wrote: However, the icons have been ok ever since the yesterday's update to 15.00.0404.
Ha, you're right. Gave it another try and it's ok with 15.00.0404
Thanks.

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

Re: Session Manager [v3.1]

Post by FluxTorpedoe »

Hi Everyone !

Ffff, back online (though sporadically) after half a year… 8)
& XYplorer has kept on evolving (as usual)!

Well, first of all, my warmest thanks to everyone who provided support while I wasn't there. :beer:

And now, I haven't much to produce but here's a tiny, mostly cosmetic update:
— I added a "Hide/Unhide XYplorer Main Menu" entry in the options menu —in case you mess things up with your layouts… ;)
— I found myself using the Autosave feature on and off quite regularly, pretty useful!… But the menu entries (notably the "reset") were confusing so I renamed and reordered them, hope it's better now.
— Idem for the options menu for the autosave entry which is nearly as much a function as an option, considering that it's something you might want to turn on and off regularly (and not only once like the other options).

Note: Please disable AutoSave before updating (because of a suffix change). Not a big deal but else you'll have a useless AutoSave session in your panes folder.


As usual, please comment if you feel something needs more polishing/enhancement!

Have a nice day, 8)
Flux


########################
### Session Manager v3.1 ###
########################


• REQUIREMENTS: XYplorer >= v14.10.0104 :!:
Previous version v2.71 available here

• INSTALLATION » for first-time users:
— Please refer to first post of thread

• UPDATE » from v3.x (or not using layouts):
— Overwrite your existing SessionManager.xys with latest version

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

Session Manager v3.1 - Changelog
+ 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
Attachments
SessionManager.xys
(82.67 KiB) Downloaded 142 times

Post Reply