^ Scripting: Assign Native Variable

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Zardoz2293
Posts: 617
Joined: 09 Nov 2011 20:20
Location: USA

^ Scripting: Assign Native Variable

Post by Zardoz2293 »

I'm unable to see how you can assign a value to a XY native variable. Example: <curpath> is renamed. Refresh causes focus to parent (undesired). Seems to me the <curpath> shouldn't be set to the parent on a rename, but since it is, I need to change through scripting <curpath> = Renamed Value.

Thanks
Last edited by Zardoz2293 on 03 Feb 2012 13:33, edited 2 times in total.
MacOS Tahoe v26.5.1
VM (Client): Windows 11 Pro (AArch64), 25H2.26200.8655 (10.0)
Display: Main=MacBook 4112 x 2658 @200%; External 3840 x 2160 @125%

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Scripting: Assign Native Variable

Post by Stefan »

If i understand you right, i would do it like this:

1.) $var = "NewName";
2.) rename <curfolder> to $var;
3.) goto $var;

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

Re: Scripting: Assign Native Variable

Post by admin »

@Zardoz2293: Just FYI, the "XYplorer Native Variables" are read-only. I will add that to the Help.

Zardoz2293
Posts: 617
Joined: 09 Nov 2011 20:20
Location: USA

Re: Scripting: Assign Native Variable

Post by Zardoz2293 »

Stefan wrote:If i understand you right, i would do it like this:

1.) $var = "NewName";
2.) rename <curfolder> to $var;
3.) goto $var;
Actually, I'd like to see the <curpath> not change to it's parent folder when it is renamed.

Thanks for the "goto $var"!
Last edited by Zardoz2293 on 30 Jan 2012 20:40, edited 1 time in total.
MacOS Tahoe v26.5.1
VM (Client): Windows 11 Pro (AArch64), 25H2.26200.8655 (10.0)
Display: Main=MacBook 4112 x 2658 @200%; External 3840 x 2160 @125%

Zardoz2293
Posts: 617
Joined: 09 Nov 2011 20:20
Location: USA

Re: Scripting: Assign Native Variable

Post by Zardoz2293 »

admin wrote:@Zardoz2293: Just FYI, the "XYplorer Native Variables" are read-only. I will add that to the Help.
Thanks, I looked in there and didn't find it.
MacOS Tahoe v26.5.1
VM (Client): Windows 11 Pro (AArch64), 25H2.26200.8655 (10.0)
Display: Main=MacBook 4112 x 2658 @200%; External 3840 x 2160 @125%

Post Reply