Scripting error
Forum rules
READ THIS AND DO IT!!!
Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
We recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once.
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
READ THIS AND DO IT!!!
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
Scripting error
The following script producers an error with the latest version of XY (15.00.0400)
"New Folder (Ctrl+N)";#231;
I tried #139 with the same results
"New Folder (Ctrl+N)";#231;
I tried #139 with the same results
Re: Scripting error
And which error is that?
Tried it with v15.00.0400 and v15.00.0401, works fine...
Tried it with v15.00.0400 and v15.00.0401, works fine...
One of my scripts helped you out? Please donate via Paypal
Re: Scripting error
Try this
btw while ^that^ works, this is syntactically cleaner
Code: Select all
"New Folder (Ctrl+N)" #231;Code: Select all
"New Folder (Ctrl+N)"
#231;Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Scripting error
Your suggestion to remove the semicolon (;) did not work. Still the same error.
The error is: 'new' is not a script command.
Works fine in 15.00.0300, so I regressed to the previous version.
BTW is there a way to include an image of the error in this forum? I could't figure out how to include an image of the error message.
The error is: 'new' is not a script command.
Works fine in 15.00.0300, so I regressed to the previous version.
BTW is there a way to include an image of the error in this forum? I could't figure out how to include an image of the error message.
-
admin
- Site Admin
- Posts: 65064
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Scripting error
Your script works fine here. No error.
How do you call the script?
How do you call the script?
FAQ | XY News RSS | XY X
Re: Scripting error
I am sorry, I think I gave you the wrong info.
I have the script assigned to a toolbar button.
The failing script is the left button, not the right. See below:
on left click:
$name = input("Enter Folder Name to be created in... ", "<curpath>\", "New Folder");
end ($name == "" || $name == " " ), "No name entered!";
new ("$name", dir);
on right click:
"New Folder (Ctrl+N)" #231;
I have the script assigned to a toolbar button.
The failing script is the left button, not the right. See below:
on left click:
$name = input("Enter Folder Name to be created in... ", "<curpath>\", "New Folder");
end ($name == "" || $name == " " ), "No name entered!";
new ("$name", dir);
on right click:
"New Folder (Ctrl+N)" #231;
Re: Scripting error
Code: Select all
$name = input("Enter Folder Name to be created in... ", "<curpath>\", "New Folder");
end (!$name || regexmatches($name, "^\s+$")), "No name entered!";
new($name, "dir");One of my scripts helped you out? Please donate via Paypal
Re: Scripting error
Highend, Is the above script a emplacement?
Did the script rules change?
Will XY be "fixed", or do I have to change the script?
For now, I am sticking with 15.00.0300.
Did the script rules change?
Will XY be "fixed", or do I have to change the script?
For now, I am sticking with 15.00.0300.
Re: Scripting error
A replacement? Yeah...Highend, Is the above script a emplacement?
Why?Did the script rules change?
You've used new (...
but it's new(...
Hence the error.
No clue what you mean.Will XY be "fixed", or do I have to change the script?
One of my scripts helped you out? Please donate via Paypal
Re: Scripting error
My old script worked for a few years, in XY.
Something changed in 15.00.0400.
15.00.0300 still works, using the original script.
My question was related to the above facts.
Was this a bug introduced in 15.00.0400 that will be reversed?
Something changed in 15.00.0400.
15.00.0300 still works, using the original script.
My question was related to the above facts.
Was this a bug introduced in 15.00.0400 that will be reversed?
-
admin
- Site Admin
- Posts: 65064
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Scripting error
Confirmed. I recently (20150410) added an optimization that failed on the (slightly anarchic) syntax you are using. The next beta will work again as before.InTheMood wrote:My old script worked for a few years, in XY.
Something changed in 15.00.0400.
15.00.0300 still works, using the original script.
My question was related to the above facts.
Was this a bug introduced in 15.00.0400 that will be reversed?
FAQ | XY News RSS | XY X
-
PeterH
- Posts: 2826
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Scripting error
I completely understand, that for func( $parms ) there should be no blank in front of the first parentheses.admin wrote:Confirmed. I recently (20150410) added an optimization that failed on the (slightly anarchic) syntax you are using. The next beta will work again as before.
But, for example: how should it be for If( ... ) - is there the same rule, or is it something different?
(Just to verify. I'd expect: different situation.)
Re: Scripting error
[expunged]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
PeterH
- Posts: 2826
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Scripting error
Sammay, before writing you should have a look at the documentation
It says: "Parentheses around the expression are mandatory."
(Yes: it's changed some time ago, and still works without.)
For Foreach and While it always was this way.
So there "might" be a risk that Don planned those to be without blank. Though I still don't think so.
I still wish(!) XY would notify users of such situations, so they could be corrected.
(Not long ago there was some discussion about "XY should handle syntax more strict". I think this belongs there...)
It says: "Parentheses around the expression are mandatory."
(Yes: it's changed some time ago, and still works without.)
For Foreach and While it always was this way.
So there "might" be a risk that Don planned those to be without blank. Though I still don't think so.
I still wish(!) XY would notify users of such situations, so they could be corrected.
(Not long ago there was some discussion about "XY should handle syntax more strict". I think this belongs there...)
Re: Scripting error
well, oops.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
XYplorer Beta Club