Session Manager [v6.60]

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

Re: Session Manager [v1.02]

Post by klownboy »

Hi again PeterH,
So all start types supplying one caption (or any list of captions) lead to no-execution of _Initialize or _Terminate.
I ran your script(s) above and I think that is what Don is saying here in his Beta history for v12.10.0001.
If a script within a MSR is called directly (SCs Sub or Load), then "_Initialize"/"_Terminate" are NOT called.
When I ran your test script with no labels, it essentailly ran everything..."_Initialize,a ,b,c, sub, and lastly "_Terminate". I know we had the capability to "load" and set variables...actually, I remember and saved some of your posts that went into detail on that some time back, but now with "_Intialize" we'll be able to do that automatically in a script that contains it. It's kind of nice since other scripting lanquages as far as I know have something similar without having to specifically use a load "_BlaBlaBla". In some cases when it comes right down to it, it was used because we didn't have a feature (or script) like "_Initialize"/"_Terminate". For info, I ran some test scripts which used no labels or menus, but used "popupmenu" and <get drop>, and "_Initialize"/"_Terminate" were executed.

By the way, as a minimum I was probably abusing "_Initialize", but then again I'm still just playing. :)

Thanks again,
Ken

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

Re: Session Manager [v1.02]

Post by admin »

BTW, while writing the next Help file, I kind of "discovered" this functionality:
These assigned values can be variables themselves, or even expressions or functions:

Code: Select all

perm $a = <clipboard>; echo $a; 
perm $a = 5 + 7; echo $a;
Cool, huh? 8)
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

Neat! (& good to know)
I can already hear the perms in the playground: "We don't need no... evaluation!"
:twisted:

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

Re: Session Manager [v1.02]

Post by admin »

:lol:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: Session Manager [v1.02]

Post by klownboy »

Don, very slick, ::perm $a = 5 + 7; echo $a; eval($a); (on the AB) = 12

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

Re: Session Manager [v1.02]

Post by admin »

klownboy wrote:Don, very slick, ::perm $a = 5 + 7; echo $a; eval($a); (on the AB) = 12
Yep, it's remarkable. All programm languages I know don't allow this. :biggrin:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: Session Manager [v1.02]

Post by Filehero »

admin wrote:Yep, it's remarkable. All programm languages I know don't allow this. :biggrin:
For obvious reasons. :mrgreen:

<OT On>
Eval is evil. :wink:

For me it's a love-hate thingie. As long as I'm coding on my own it's only me and my spare time when it's up to face the consequences of some fancy LoCs. But woe it's about a joint/collaborative project, all the best for hunting down the blocker bugs ....

But since with SC I am on my own Eval is a great source for fun. :D

@klownboy: great to see you've become a real SC coder. :appl:
<OT Off>

Cheers,
Filehero

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

Re: Session Manager [v1.02]

Post by klownboy »

Hey Filehero,
I'm still a newb compared to you and most others on this forum, but I'm learning and more importantly having fun. I hope all is well.
Take care,
Ken

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

@all
Here's a new version: Session Manager v2.5 beta1. (too lazy to update the first post now)
:!: Requires XYplorer >~ v12.10+(?) (because of new "_Initialize" auto-load)

Changelog:
! Fixed missing active session and menus under Win7
* Streamlined code to use "_Initialize"
+ Abused said code, so SM subscripts can now be called directly (after an "_Initialize" load), e.g.

Code: Select all

load "SessionManager", "_Initialize"; load "SessionManager", "_Reset";
@binocular222
So you called customer support...? :wink:
Here it goes. Hope that suits you. 8)
Attachments
SessionManager.xys
(69.12 KiB) Downloaded 85 times

binocular222
Posts: 1414
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: Session Manager [v1.02]

Post by binocular222 »

Whao, superb!
Thanks
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

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

Re: Session Manager [v1.02]

Post by klownboy »

Lookin' good Flux!

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

Re: Session Manager [v1.02]

Post by Filehero »

Hi Flux,

I noticed with 12.20.0409 that there's something wrong with resetting a session. In fact, though I see "some GUI flickering" nothing happens with regard to the tab contents. Switching sessions works normal, however.


Cheers,
Filehero

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

Re: Session Manager [v1.02]

Post by FluxTorpedoe »

@all
Here's a new version: Session Manager v2.5 beta2. (still too lazy to update the first post now)
!! Requires XYplorer >~ v12.10+ (because of new "_Initialize" auto-load)

Changelog:
! Fixed some broken icon(s) since v2.5b1 Win7-Fix
! Fixed catalog above/below tree for sessions with layout (while keeping things smooth - tricky one!)
SessionManager.xys
(67.28 KiB) Downloaded 83 times
@Filehero
I'd skipped 0409 but it was working here before (0408...), and it's working under 12.30. Don't know what can cause this, could you confirm it's still broken with v2.5b2? (you're under Win7?)

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

Re: Session Manager [v1.02]

Post by Filehero »

FluxTorpedoe wrote:@Filehero
I'd skipped 0409 but it was working here before (0408...), and it's working under 12.30. Don't know what can cause this, could you confirm it's still broken with v2.5b2? (you're under Win7?)
Quick test with 2.5 beta2 and 12.30.0001: reset works again. :D

I'm on Win 8 Pro.


Cheers,
Filehero

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

Re: Session Manager [v1.02]

Post by Filehero »

It's time for another kudos: great script!!


Cheers,
Filehero

Post Reply