Labels in scripting ?
Labels in scripting ?
Can someone help me understand the use of Labels in use of scripting. From my understanding, when selecting a file a script can be executed; or if a file is executed, if it is a type of file which can be executed ?
Re: Labels in scripting ?
Advanced Topics - Scripting - Multi-line Scripts and Multi-Scripts: Script Files for the Advanced - Labels + Hiding scripts inside a script file...
One of my scripts helped you out? Please donate via Paypal
Re: Labels in scripting ?
Alright, I was reading this; https://www.xyplorer.com/tour.php?page=scripting
Re: Labels in scripting ?
I created a Label, although I don't know how to execute it inside a file ?
Re: Labels in scripting ?
Then you didn't read that page you just linked above, or the help topic location provided... both explain and have examples how.
Re: Labels in scripting ?
I did read the page, I created a XYS file, within the file I simply put;jupe wrote:Then you didn't read that page you just linked above, or the help topic location provided... both explain and have examples how.
Code: Select all
"Go to C:\ : croot" goto "C:\"
Code: Select all
load "test.xys","croot"
Re: Labels in scripting ?
In your example you would need to end the command you entered in the address bar with a semi-colon (like you should get in the habit of doing everywhere), or precede it with double colons (as explained in the help file, if you read it), and test.xys needs to be in <xyscripts>, or alternatively provide the complete path to that file in the address bar input.
Re: Labels in scripting ?
When in the address bar entering; I get an error that there is no croot in test.xys ?
Code: Select all
load "test.xys","croot";
Code: Select all
The list of labels did not match any script in Script file 'C:\Custom Program Settings\XYplorer\test.xys'.
load
test.xys
croot