Page 1 of 1

Labels in scripting ?

Posted: 23 Sep 2018 17:19
by CookieMonster
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 ?

Posted: 23 Sep 2018 17:31
by highend
Advanced Topics - Scripting - Multi-line Scripts and Multi-Scripts: Script Files for the Advanced - Labels + Hiding scripts inside a script file...

Re: Labels in scripting ?

Posted: 23 Sep 2018 17:33
by CookieMonster

Re: Labels in scripting ?

Posted: 25 Sep 2018 04:59
by CookieMonster
I created a Label, although I don't know how to execute it inside a file ?

Re: Labels in scripting ?

Posted: 25 Sep 2018 06:53
by jupe
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 ?

Posted: 25 Sep 2018 16:05
by CookieMonster
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.
I did read the page, I created a XYS file, within the file I simply put;

Code: Select all

"Go to C:\ : croot"  goto "C:\"
In the address bar I enter;

Code: Select all

load "test.xys","croot"
and so nothing happens ?

Re: Labels in scripting ?

Posted: 25 Sep 2018 18:09
by jupe
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 ?

Posted: 26 Sep 2018 18:15
by CookieMonster
When in the address bar entering;

Code: Select all

load "test.xys","croot";
I get an error that there is no croot in test.xys ?

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