Page 1 of 1

^ Scripting: Assign Native Variable

Posted: 27 Jan 2012 19:54
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

Re: Scripting: Assign Native Variable

Posted: 27 Jan 2012 20:20
by Stefan
If i understand you right, i would do it like this:

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

Re: Scripting: Assign Native Variable

Posted: 28 Jan 2012 10:07
by admin
@Zardoz2293: Just FYI, the "XYplorer Native Variables" are read-only. I will add that to the Help.

Re: Scripting: Assign Native Variable

Posted: 30 Jan 2012 20:38
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"!

Re: Scripting: Assign Native Variable

Posted: 30 Jan 2012 20:39
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.