Have problem with load and tabset

Discuss and share scripts and script files...
Post Reply
Borut
Posts: 1472
Joined: 19 Oct 2010 19:29
Location: Win10 Pro 64b 22H2, @120DPI (125%)

Have problem with load and tabset

Post by Borut »

Let $TabsetBase be a permanent variable already set to an existing folder.

Then the following scripting command will work as expected:

Code: Select all

tabset("open", "$TabsetBase as: $TabsetBase\<get pane>");
If, however, I prepare a script file Tabsets.xys with the following content:

Code: Select all

"Open Tabset : opentabset"
  tabset("open", "$TabsetBase as: $TabsetBase\<get pane>");
and define "On right-click" of the user button to be:

Code: Select all

 load "Tabsets.xys", "opentabset"
then this seems not to work. Apparently $TabsetBase is not being resolved in that case - I am getting the error message:
"Path not found: C:\_PortableProgramFiles\xyplorer\Data\Panes\$TabsetBase\"

What am I doing wrong? (I additionally tried pronouncing $TabsetBase a global variable, but that did not help.)
Win 10 Pro 64bit

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Have problem with load and tabset

Post by PeterH »

If $TabsetBase is set in another script, it must be defined there as global, too. (Before setting it...)

And, of course, in the refering script, before referencing.

I can't see from your description, if you did it this way.

Borut
Posts: 1472
Joined: 19 Oct 2010 19:29
Location: Win10 Pro 64b 22H2, @120DPI (125%)

Re: Have problem with load and tabset

Post by Borut »

PeterH wrote:And, of course, in the refering script, before referencing.
Thank you Peter! :D This seems to have been it. Interestingly enough, this seems to have worked before, when I had them all defined directly with the user button. As soon as I defined them in a .xys-file and started using load in user button, this apparently became important.

BTW, had a lot of fun now viewing the "photoshopic" reviews of XY by FeatureCreep. "Mouse Down Blow Up"... ROTFL :mrgreen:
Win 10 Pro 64bit

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Have problem with load and tabset

Post by PeterH »

Glad if I could help.

And glad I could read FeatureCreep's "photoshopic" reviews in the meantime. Enjoyed it :D

And by the way: Merry Christmas to everyone! Have some fine days!

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Have problem with load and tabset

Post by j_c_hallgren »

Borut wrote:BTW, had a lot of fun now viewing the "photoshopic" reviews of XY by FeatureCreep. "Mouse Down Blow Up"... ROTFL :mrgreen:
Yup! Those are some GREAT images! I hope that Don can make use of some of them on the actual XY site.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Post Reply