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

Discuss and share scripts and script files...
klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: Session Manager [v1.02]

Post by klownboy »

Hi Flux,

Sorry for being long winded as well the nitpicking. I do really like your Session Manager. I wouldn't comment if I didn't. I see your point on the "..." vs. ">". Have you tried using an ASCII code like ALT-026 (i.e., hold down alt key and press 026 on the numeric keypad) will generate a nice arrow pointing to the right. :arrow:

Again sorry for the length of the post, but when you get a chance, the edit is perhaps the most significant of my minor comments based on further use of Session Manager on another computer. By the time you got down to it, you were probably saying WTH. :)

Thanks again,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

Pre-EDIT: No WTH at all! I was previewing my lengthy answer when I saw your post... :)

---
klownboy wrote:"Layout loading: On" is exactly what it says.
Well, not exactly. My fault, bad wording.:cry:
I must and will reword it: "Use Layouts: On/Off" (unless someone thinks of a better name).

With "Layout loading: ON", the possibility of using layouts with sessions is available.
- New sessions can be saved directly with a layout (e.g. Menu "Save Session as..." > "?mysession")
- Standard Sessions can be upgraded to Layout Sessions by associating the current layout (Menu "Layout Tools" | "Save Layout of Current Session")
- All existing Layout Sessions will be detected, and marked in the list with a different icon and an extra • suffix.
When a Layout Session is active:
- the menus Reset and Update will change with the added mention "(and Layout)", and their function will act accordingly.
- The popup menu "Layout Tools" will mention "Update Layout of Current Session" instead of "Save (...)" and will be filled with more layout-related tools.
etc.


With "Layout loading: OFF", all sessions are treated equally as "Standard Sessions", i.e. only tabsets are involved, no layout.
Basically, Session Manager is considered "layout-less".
> All visual signs or mentions of layouts related to sessions (*) should disappear.

(*)Note that:
- There's always available the ability to manually save and load a default layout in Menu "Layout Tools" (which is a "bonus" tool, independent of sessions).
- There's the possibility to force the layout to be reset to default each time a session is changed by checking the Option: "Standard: Always Load Default Layout on Session Change" (OFF by default)

---------
klownboy wrote:"Update Layout of Current Session" is not a "setting" like you have for "Layout loading" that gets a check mark.
Exactly, it is not a setting.
klownboy wrote:It's worded such that the user simply thinks he's saving the layout at that point in time when he clicks on it
Exactly, it does that only, and nothing more.

• So, to sum things up:
klownboy wrote:"Layout loading: On" is exactly what it says. It's telling Session Manager whether you want to load the layouts with the session which evidently has nothing to do with whether you want layouts saved when you're updating the sessions. I discovered that it was only when I clicked on "Update Layout of Current Session" under Layout Tools that the layouts were actually being saved with the sessions
Not at all. :( That shouldn't be the case.

Except the badly named "Layout Loading", everything else should do exactly what it's meant to do... That's where I'm lost.
Can you repro this?

---------

About the arrow to indicate popups, last time I checked (last year?) I didn't find anything that worked correctly/systematically with default fonts (and regular codepages). I'll double-check.

Anyway, thanks a lot for the feedback! No worries for nitpicking, on the contrary. :D

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

Re: Session Manager [v1.02]

Post by klownboy »

Hi again Flux,

Ok, I've been experimenting further on a couple of different computers. By the way, thanks for all the explanations. What is the expected behavior when you "Save Session as..."? When I tried this... Layout Loading: On, which means the current session (with an already saved layout), and has the • suffix. When you save the session as, "Clyde CrashCup", even though Load Layout is ON, what you're saying is, the new saved layout will not have it's layout automatically saved until you "Save Layout with Current Session" under Layout Tools and therefore will not have the • suffix either. That's what I wasn't following in the earlier post and what may be a bit confusing to new users. As you said, " the possibility of using layouts with sessions is available" when Load Layout is On.

Honestly, I'm not sure why you wouldn't automatically save the layout when you have Load Layouts On. A person can always change the layout and then update the session. You've made it a two step process at least for the initial setup of a session in the above manner by having to first "save session as" and then one has to save the layout. I can see your thought process though having "Save" initially when the layout hasn't been saved and "Update" for subsequent saves. A new user saves a session that has a layout and he has Layout Loading ON, I'd think they would tend to believe or expect the new layout would be saved with the new session and subsequent layout changes would be saved when you Update session (and the "and Layout") would already be in the menu. By the way, this is precisely the reason why I wasn't seeing "(and Layout)" in my earlier post (i.e., I hadn't saved the layout initially because I didn't think I had to). :) It is quite nice to have the "Update layout" menu item, but I'm not sure the initial saving of the layout should be necessary when Load Layout is ON. It's really not an issue with me now that I know what's happening.

"Use Layout: ON" or even simply, "Layouts: ON" would be fine.

Thanks again,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

Hi'
---------
@all - Tip about saving sessions with layout
To save a session "Clyde" with a layout, either:

• Menu "Save Session as..." > "?Clyde" > Enter
[Note the ? before the name], or

• Menu "Save Session as..." > "Clyde" > Menu "Layout Tools" > "Save Layout of Current Session"
[Useful mainly when you already have a Standard Session saved]
---------
klownboy wrote:When you save the session (...) even though Load Layout is ON, (...) the new saved [session] will not have it's layout automatically saved
Exactly. But first I must say I'm relieved there was no bug and just a misunderstanding of some functions! Ffff :)
Look carefully at the "Save Session" window. I know it's not very intuitive but it says:
"To save a session with its layout, add a question mark '?' before its name"
Just see this as a checkbox. It's not as elegant but checkboxes can't be done in XY right now (no big deal).
klownboy wrote:Honestly, I'm not sure why you wouldn't automatically save the layout when you have Load Layouts On.
Simply because -from experience- most sessions don't need a dedicated layout.
e.g. I've currently 14 (reordered) sessions, between professional work, personal work, and leisure. But only 3 are "Layout Sessions" ("Images", "Video preview", "Musical scores browser").
Because when I switch from my main "Local" session to my "Transfer", "XYplorer dev", "Sandboxie", "Work Project 1", etc. I don't want to disrupt my workflow and just want to remain in my default environment, i.e. the default layout...

& @all
This is only one approach, but I hope it gives you a different perspective.
Don't hesitate to share your own view or ask any question!

Have a nice day, 8)
Flux

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

Re: Session Manager [v1.02]

Post by klownboy »

Hey Flux,

Again, thanks for the explanations. Sorry, I had noticed the ? save session with layout statement a week ago and lost track of it. I do see what you're saying about the need for saving layouts, in that in many cases it's simply not necessary and we can use the default. I had been experimenting lately with dual panes, which I typically don't use, so I was saving the layout with the session. Of course the most commonly used option for saving layouts with the session, when the layout has been previously saved with a session, is to simply "Update Session (and Layout)...".

Why not use inputselect in lieu of input for the "Save Session as..." dialog box and have a check box for "Save Session with layout" and another with, "Save Session without layout". I've use inputselect a number of number of times to provide a checkbox selection and it works great. You can provide a default pre-checked selection which in your case would probably be "Save Session without layout".
inputselect.JPG
inputselect.JPG (48.84 KiB) Viewed 2989 times

Code: Select all

       $crop2 = inputselect("The primary crop on image ". $fn ." will be in the horizontal [x] axis (left and right side).<crlf>Would you first like to perform a minor crop on the top or bottom?<crlf><crlf>Select a side to crop or none:","Top|Bottom|+None", | ,2, "None",700, 300, "Crop on Vertical [y] Axis?");
       if ($crop2 != "None") {sub "_crop2_y"}
Thanks again,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

klownboy wrote:Why not use inputselect in lieu of input for the "Save Session as..." dialog box
Nice idea, and I'm well aware of inputselect(), but then... where do you enter the name of the session? :biggrin:
(unless you were talking about opening a second dialog, but I guess not.)

BTW, I checked again the possibility for "right pointer / arrow" and the only ones remotely resembling arrows are "out of range" so just won't display with Tahoma or the other generic UI fonts...

Out of curiosity, I don't see how ALT+026 could lead to an arrow... With which font did you get this?

Anyway, thanks a lot for your feedback! :D
Flux

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Session Manager [v1.02]

Post by TheQwerty »

FluxTorpedoe wrote:
klownboy wrote:The other very minor nit-pick is the use of the ">" after "Layout Tools" and "Options" in the main menu. On my screen they don't align vertically and I think the menu would look a bit more professional if you simply stayed with the "..." as you use in the other menu items.
I love nitpicking 8) , and I would dislike the misalignment too! But it wouldn't be logical to use "..." (not the same meaning, these entries open a popup menu, not a dialog), so I used TAB instead of spaces and now it should be aligned whatever the font. Fixed.
I was curious how Microsoft's guidelines actually reccommend that ellipses be used.

In the ellipses section, it seems to boil down to they should be used to signify that there is more information required and the ability to cancel remains after this particular selection. Which to me means they would be suitable for a submenu.

And the actual submenu guidelines don't really provide any useful information on naming and usage of ellipses or icons.

But then you get down to the labels section where they make a strong and clear point of saying "Menu items that display submenus never have an ellipsis on their label."


Then again if we want to get technical XYS doesn't support submenus it just so happens that instead of a dialog to get more information the menu item displays another menu thereby bypassing MS' label guidelines. :veryconfused:


In the past I played around with something similar to what you're doing here, didn't like it very much (don't remember why), and felt justified in using an ellipsis given the lack of true submenus in XYS.
But after skimming those guidelines again I think I may have to adopt a similar pattern going forward. :whistle:

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

Re: Session Manager [v1.02]

Post by klownboy »

Hey Flux,
I'm using Courier New in TextPad provides an arrow by holding down alt and pressing 026 on the numeric keypad. It's one of the ASCII characters. It doesn't show in the post. I'm in an airport so I can't write much.
Thanks,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

Thanks for the links TheQwerty! Good to have some official guidelines, and there's some interesting info in there - including the OffTopic "Labels: Use sentence-style capitalization"... (don't know if I'll comply blindly though, will try and see).

To get back to Ellipsis/Pointer, it's true that XY's submenu are missing the dropdown effect, but apart from that, their whole behavior is that of a submenu, so I tend to consider them as such.

So to sum things up, the approach was:

Code: Select all

Menu
Entry        = Immediate action (no confirmation/dialog)
Entry...     = Action opening/preceded by a dialog (confirmation, settings...)
Entry   >    = dropdown of a submenu (no action whatsoever)
But anyway that's guidelines... Plus we don't have no pointer. :P

I downloaded TextPad and tried with Courrier New (under WinXP), and ALT+026 only gives me an empty rectangle.
In XY -as in most softs/editors- ALT+026 just doesn't register, so I pasted the rectangle from TextPad into the menu of a CTB in XY, but it also appears as an empty rectangle in the dropdown menu (Tahoma font). :( But thanks for the info, Ken.
Maybe there's been an update of those fonts in Win7+ (though I think I'd already overwritten both those fonts with the latest ones).
Anyway, it seems like we'll have to stick with the ">" for a while... Well, we've seen worse! :biggrin:

But/and if anyone comes with any idea, they're all welcome!

Have a nice day, 8)
Flux

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

Re: Session Manager [v1.02]

Post by klownboy »

Hey Flux,
Certainly no big deal, but on the blasted arrow topic again...I just changed a menu to use the arrow (ALT-026) and it displays fine in my XY menu as does a bell or bullet. Too bad there isn't some consistency in the use and display of these special characters. I'm using Windows 7 SP 1, x64 with no special or additional fonts installed unless installed by a program. It is Courier New in TextPad. My encoding for xys files is ANSI though, not UTF-8 or unicode. In TextPad or any other editor, it may have to do with the Preferences for saving text files - saving as Unicode or UTF-8 or ANSI. I believe that may be the key. I tried using notepad and it didn't work just even with Courier New - again, just for your info.

Thanks again,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

Hi Ken,
Thanks for the extra info. On my side, I'm always careful to stick to ANSI for .xys and from what you describe, the only difference with my test with TextPad was the OS. I'll have to reach a Win7 to try, at least to satisfy my curiosity!

In the meantime I've implemented the freshly available "Show sort headers in all views" so it can be saved with layouts. Nice. :)

And some day, we'll even have Columns Layouts too... hek hek hek :mrgreen:

CookieMonster

Re: Session Manager [v1.02]

Post by CookieMonster »

What is the newest version of this script, looks helpful ? :)

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

Hi'
CookieMonster wrote:What is the newest version of this script, looks helpful ?
Session Manager v2.6b4
I already have a new one, but nothing major so I'm holding it a bit more...
And I still haven't been able to put my hand on a Win7 to try with better cross-OS icons and create snapshots for the long-awaited first post update...
So if you have any question, don't hesitate to ask!

Have a nice day, 8)
Flux

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

Re: Session Manager [v1.02]

Post by klownboy »

Hey Flux,

Let me know if you would like something evaluated/tested on a Windows 7 (x64) machine or Windows 8. I'd be glad to help out.

Have you ever had any issues when you restart XY, and it restarts not in the last session (using SessionManager), but instead XY starts up in a previous session. The last session was "saved/updated with layout" and I would also save all XY settings, yet XY started (a number of times) with a previously saved session in lieu of the last one? Very strange and after a number of restarts of XY it finally started in my last session.

Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

CookieMonster

Re: Session Manager [v1.02]

Post by CookieMonster »

FluxTorpedoe wrote:Hi'
CookieMonster wrote:What is the newest version of this script, looks helpful ?
Session Manager v2.6b4
I already have a new one, but nothing major so I'm holding it a bit more...
And I still haven't been able to put my hand on a Win7 to try with better cross-OS icons and create snapshots for the long-awaited first post update...
So if you have any question, don't hesitate to ask!

Have a nice day, 8)
Flux
I placed session manager as a script button, when I run the script, nothing happens ?

Post Reply