Labels in scripting ?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
CookieMonster

Labels in scripting ?

Post 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 ?

highend
Posts: 13316
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Labels in scripting ?

Post by highend »

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

CookieMonster

Re: Labels in scripting ?

Post by CookieMonster »


CookieMonster

Re: Labels in scripting ?

Post by CookieMonster »

I created a Label, although I don't know how to execute it inside a file ?

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Labels in scripting ?

Post 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.

CookieMonster

Re: Labels in scripting ?

Post 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 ?

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Labels in scripting ?

Post 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.

CookieMonster

Re: Labels in scripting ?

Post 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

Post Reply