Labels in scripting ?
-
CookieMonster
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 ?
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
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
-
CookieMonster
Re: Labels in scripting ?
Alright, I was reading this; https://www.xyplorer.com/tour.php?page=scripting
-
CookieMonster
Re: Labels in scripting ?
I created a Label, although I don't know how to execute it inside a file ?
-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
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.
-
CookieMonster
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"-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
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.
-
CookieMonster
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
XYplorer Beta Club