Session Manager [v6.00]

Discuss and share scripts and script files...
Filehero
Posts: 2277
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Session Manager [v5.80]

Post by Filehero » 07 Oct 2018 18:33

Hi Flux,

thanks for another update! :tup:

Maybe I've missed it, but is there a way to exclude the window's size/position from being saved with an layout?

Thanks,
Filehero

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

Re: Session Manager [v5.80]

Post by FluxTorpedoe » 07 Oct 2018 18:57

Hi’
Filehero wrote:is there a way to exclude the window's size/position from being saved with an layout?
Only the "maximized" status (On/Off) is saved with a layout, no size or position are saved. So loading a layout with a "restored" state will display XYplorer’s window with the last size used.

Note: the only weirdness is if you change screen resolution between some states (e.g. when launching a small res. fullscreen game)—but the size of all "restored" windows is always offset anyway…

GUIguy
Posts: 47
Joined: 03 Jan 2016 02:11
Location: Oregon, USA Win Pro 7-64 & 10-64
Contact:

Re: Session Manager [v5.80]

Post by GUIguy » 08 Oct 2018 03:48

DANG! You're good! :appl: :appl: :appl:
GUIguy
I measure a good day by how little I fell behind
Help make Alzheimer's Disease a distant memory: http://www.bitly.com/LaytonCenter

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

Re: Session Manager [v5.80]

Post by Filehero » 08 Oct 2018 08:39

FluxTorpedoe wrote:Only the "maximized" status (On/Off) is saved with a layout, no size or position are saved. So loading a layout with a "restored" state will display XYplorer’s window with the last size used.
. Actually size is stored/restored over here. Before confusing everybody I will have a more detailed look at it again.

hogaty
Posts: 170
Joined: 19 Apr 2013 21:14

Czech language file updated for version v5.80 of the script.

Post by hogaty » 09 Oct 2018 21:48

Czech language file updated for version v5.80 of the script.

viewtopic.php?f=12&t=9541&p=127437#p127163

Session Manager is very useful especially for users who need often change their working directories and working environment too.
Very good script.

Hogaty

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

Re: Session Manager [v5.80]

Post by FluxTorpedoe » 11 Oct 2018 20:57

@hogaty
Thanks a lot! :) I updated the v5.80 post accordingly.

@Filehero
Some black magic going on… (Maximize is only stored as binary 0|1) :ninja:
Let me know how things evolve!

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

Re: Session Manager [v5.80]

Post by klownboy » 14 Oct 2018 18:26

HI Flux, another fine update. I'm still having a recurring issue though with maintaining the restored state for one of my sessions. I mentioned this on the previous revision. At the moment all my other sessions, other than my "Normal" session, happen to be maximized. All sessions are saved with layout as I mentioned before. Only one session (Normal) is saved in the restored state, not max or min. I saved my session in the restored state and made sure both the "default" session and my "normal" session have a "0" value for the maximize setting in the sessionmanager.ini file. I then Update the session (Normal) with layout using the that menu item. When I go and check the ini file again, the Normal layout maximize setting is 1 again and it should be "0". Which means when I then go to one of my maximized sessions and then back to the "Normal" session it's maximized instead of restored. So for some reason it's saving the session as maximized state when I use "Update session with layout". Very strange. Not a big deal obviously...just wish I knew why it was doing that. Thanks.

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

Re: Session Manager [v5.80]

Post by FluxTorpedoe » 18 Oct 2018 23:10

Hi Ken,
I tried to replicate what you describe in any way I could think of, but cannot reproduce such a behavior...
Could you please give me a step-by-step way to reproduce this from a fresh XYplorer so I can pinpoint the :bug: ?

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

Re: Session Manager [v5.80]

Post by klownboy » 19 Oct 2018 14:36

Well, it figures, when I set Session Manager up in a fresh copy, I couldn't duplicate the problem. So back to my setup... It only happens when I save my session "Normal" that is in the "restored" state. The "Maximize" setting of my "Normal" session (with layout) changes to "1". As a matter of fact, if I open sessionmanager.ini (keep it open) and note that Maximize is "0" and then update the that session (with layout), the Maximize setting immediately changes to 1". In typical use, going back and forth between my "Normal" session and one of my maximized sessions, it works fine.

Maybe I can track down the issue. Could you tell me how you obtain the information that a session is in the "restored" state as opposed to a "maximized" state (i.e., how does the script know to change to "maximize" setting to "0")? It's obviously a very long script, but maybe I could put some steps in key places within the script in attempt to track it down. For some reason, it's changing the "Maximize" setting to "1" when it's clearly in a restored state.

Edit: OK Flux, I can see in lines 2205-2211 you are determining XY size and screen size to determine if we are in a restore or max state. In lines 2128-2142 you restore or maximize the window for a session...now for some stepping...

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

Re: Session Manager [v5.80]

Post by klownboy » 19 Oct 2018 20:02

Hi Flux, the problem comes in lines 2206 and 2207 for the calculation of $fullwidth and $fullheight and the fact that my "normal" session "restored" size is not significantly smaller than the total screen size. So, that calculation of: 'screen width' - 'XY width' - 'starting X position' for that session will always be less than "100" and the calculation results in a false value ("1"). I'm not sure why you picked "100". I assume it's arbitrary. I'm also not sure or why you also factored in the X and Y start position in the calculation. I'm probably missing something obvious :) 'cause I'm an old fart, but isn't the fact that there is (some arbitrary but smaller) difference between the screen size and XY size in itself enough so determine if it's a restored state or maximized state? In my case I have a screen width of 1920, a XY width of 1900 and an X position of 5. That will of course always result in a $fullwidth value of 1, and similarly for Y calculation. Not a big deal, but at least we know why I was the only one reporting an issue...probably because I was the only one who had a restored session that close to full screen.

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

Re: Session Manager [v5.80]

Post by FluxTorpedoe » 19 Oct 2018 21:55

Hi Ken,
Thanks for digging! Funny thing is, when I saw your next-to-last post, I was too short on time to answer, but I had an eureka moment… Which is just what you found out in the meantime: wouldn’t the size of your restored session be nearly full screen!? :kidding:
Only two solutions then: slightly reduce width or height of XYplorer’s window of your restored session before updating it; or lower the 100 value in the script.

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

@all
In Session Manager, a layout session is considered "restored" (non-maximized) if XYplorer’s window width OR height is significantly smaller than full-screen values. It is based on an (unfortunately approximate) computation: comparing the screen size to XYplorer’s reported size.

The problem is that these last values are, hum, weird. E.g. on my computer (1920x1080), the reported maximized values are "-9|-9|1860|1098" (or "-9|-63|1860|1098" depending on the referential), which would make my screen 1869x1107 (or 1869x1161)!

The trouble comes from Windows Taskbar. And its position and size might vary between users (personally, I have it at the right of the screen)…

So I decided to differentiate "Maximized" vs "Restored" status based on the aforementioned difference —minus an (indeed) arbitrary value: 100, to cover the fluctuations of size and position of the taskbar.
Q.E.D.!
Ffff… :biggrin:

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

Re: Session Manager [v5.80]

Post by klownboy » 19 Oct 2018 22:22

Thanks Flux for the explanations. I hadn't thought about how the task bar would affect that calculation. Mine is on auto-hide and on the bottom forever. My normal restored XY size was always just under the screen size mostly to accommodate as many thumbnails as possible thumbnails. I tweaked that 100 value down quite a bit so it wasn't a factor in saving the session. Thanks again.

Just to note for history only, the reason I had no problem when I tried to recreate the problem in a fresh instance is that I used a restored state XYplorer window much smaller than the windowed state I normally use.

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

Re: Session Manager [v5.80]

Post by calude » 29 Dec 2018 13:45

Hi Flux
would it be possible to add to the layout saving, the catalog category that is open

Have a wonderful day

Claude

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

Re: Session Manager [v5.80]

Post by FluxTorpedoe » 09 Jan 2019 22:53

Hi everyone,

And first of all: Happy New Year!   8)

@Claude
Well, there’s no function that I know of that can retrieve the state of catalog categories, nor act on them (except to expand all).
But… BUT! There’s a workaround: by duplicating the desired catalog, and having each displayed as intended.
Session Manager was just missing the ability to associate catalogs with (layout) sessions. A feature I’d started to implement more than… six years ago! :mrgreen:
So I got back to it and added it—as an option—, and it seems to be working quite fine (with no speed penalty).

@all
Next version of Session Manager will also be able to fully remember XYplorer window size and position. This will replace the previous windowed/fullscreen-only option.
Expect a release soon… :twisted:

Have a nice day,

Flux

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

Re: Session Manager [v6.00]

Post by FluxTorpedoe » 10 Jan 2019 12:17

 
######################
###  Session Manager v6.00  ###
######################



Hi everyone,
Here’s a new version, with a first digit change!

Have a nice day! 8)
Flux

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

• HIGHLIGHTS:
++ Automatically save/restore catalog association with layouts (enable in Options menu)
++ Automatically save/restore XYplorer window position and size with layouts (enable in Options menu)
   ☛ Note for both: active Catalog/WindowSettings are automatically associated with Default Layout when related option is enabled
   ☛ Note for both: existing layout sessions must be manually updated in order to remember their associated Catalog/WindowSettings
For more details, see changelog just below…

• CHANGELOG:
Don’t hesitate to browse the exhaustive changelog (with download links to previous versions) here: • Session Manager Changelog •

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

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

• UPDATE » for all users:
 — Overwrite your existing "SessionManager.xys" file with latest version
 — Recommended (if updating from < 5.73): Update your layout sessions and default layout (and default toolbar if applicable)
   ☛ Session Manager > "Layout tools" > "Update Default Layout" + "Update Default Toolbar"
   ☛ For each layout session > "Update Session (and Layout)"

• UPDATE » for non-english users:
 — Also download one of the language files and extract it into the same folder as SessionManager.xys (language detection is automatic)
Note (if applicable): "Temporary" and "Autosave" sessions might appear as regular sessions after update, depending on how this strings are translated. Just save again the affected session(s) and delete the obsolete one(s).

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

• DOWNLOADS:   Require XYplorer ≥ 17.50.0211 (previous versions available in Changelog)

› Script:
SessionManager.xys
(166.06 KiB) Downloaded 94 times
› Script in UTF-16 LE: (Special version for foreign languages who encounter "invalid character" issues)
SessionManager-UTF16.zip
(34.2 KiB) Downloaded 22 times
› Languages:
Don’t forget to come back here to check when language files are updated…
Note: All the following files work with Session Manager latest version (untranslated strings will just be displayed in english).
 — Čeština by Hogatyv6.00
 — Dansk by Regmosv6.00
 — Italiano by Flora_RMCv6.00
 — Português (Brasil) by SkyFrontierv5.2
 — Français by pseudozv4.b1

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

• TRANSLATORS:
 — New contributions are more than welcome!
 — please head to the dedicated post on the ML forum for the changelog and latest english language file
Last edited by FluxTorpedoe on 10 Feb 2019 15:53, edited 3 times in total.

Post Reply