Scripting Bugs

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: 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%).

:info: 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.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

A bug with inputfile():
Try this: ::text inputfile("<curpath>",,"choose");
Select one file in the resulting dialog so that the filename gets written to the textbox beside the filetype dropdown, then change folders.
Do you get a msg saying:

Code: Select all

<previously selected filename>
This files does not exist.

Create the file?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

autocart
Posts: 1356
Joined: 26 Sep 2013 15:22

Re: Scripting Bugs

Post by autocart »

SammaySarkar wrote:A bug with inputfile():
Try this: ::text inputfile("<curpath>",,"choose");
Select one file in the resulting dialog so that the filename gets written to the textbox beside the filetype dropdown, then change folders.
Do you get a msg saying:

Code: Select all

<previously selected filename>
This files does not exist.

Create the file?
In my case the folder gets changed and the file name stays in the textbox but as long as I do not click "open" nothing else happens.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

Select a file, then double-click a folder in the same location. What happens now?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

autocart
Posts: 1356
Joined: 26 Sep 2013 15:22

Re: Scripting Bugs

Post by autocart »

SammaySarkar wrote:Select a file, then double-click a folder in the same location. What happens now?
Is this a trick question? Or do you really want me to repeat myself?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

No, I thought you'd used the keyboard to change folders. But I still get that msg.
Here's what I do:

Code: Select all

::text inputfile("<xydata>",,"choose");
• select "action.dat" with mouse single-click
• "action.dat" appears in the filename textbox.
• double-click "Pane" folder
• that msg appears.

Code: Select all

action.dat
This file does not exist. ...
(I'm running Weight.1 if its any help)
Icon Names | Onyx | Undocumented Commands | xypcre
[ 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 Bugs

Post by PeterH »

Did what you said...
... the "Panes" folder opens, action.dat is still shown in "Filename". 8)
No error message :naughty:

So I understand autocarts note :D

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

alright. I'll chalk it up a problem with my current setup then.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripting Bugs

Post by TheQwerty »

SammaySarkar wrote:alright. I'll chalk it up a problem with my current setup then.
For comparison you could try the same actions using Windows' Run or Notepad's open dialogs.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

First thing I tried. This only occurs in XY.
Also happens in fresh, and in a different copy of XY.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripting Bugs

Post by TheQwerty »

SammaySarkar wrote:First thing I tried. This only occurs in XY.
Also happens in fresh, and in a different copy of XY.
Not just you... I can reproduce on an 8.1 system here.

autocart
Posts: 1356
Joined: 26 Sep 2013 15:22

Re: Scripting Bugs

Post by autocart »

rename [mode (b|r|s|k|e)], pattern, [preview (p)], [itemlist], [flags=1], [illegalcharsreplacewith]
With preview it pops an ugly error dialog if the preview-dialog is canceled or escaped.
Please make it return a value instead so that the script-writer can react to it in the way he/she wishes to.
Plus the user should be able to escape it without being bothered by an ugly error dialog.
Thank you in advance, Don.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripting Bugs

Post by TheQwerty »

Passing SC Report an itemlist containing a drive causes XY to crash.

Code: Select all

Echo Report('{Name}',"<xydrive>");
Introduced in v13.70.0123 when report gained support for extra tags.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

Mine doesn't crash, but I don't think I get correct returns either.
text report("{Name}", <xydrive>); //returns '<Drive: C:>'
should return drive label, right?

Edit: now it started crashing. Not everytime though.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripting Bugs

Post by TheQwerty »

SammaySarkar wrote:Mine doesn't crash, but I don't think I get correct returns either.
text report("{Name}", <xydrive>); //returns '<Drive: C:>'
should return drive label, right?
I believe that is what it has always returned, so it is technically correct. In the very least that is what it returns back in v13.70.0122.
SammaySarkar wrote:Edit: now it started crashing. Not everytime though.
Odd, here it crashes every single time.

EDIT: Seems like there's more oddities actually. Running:

Code: Select all

text Report('{Name}');
Returns only the drive labels when viewing Computer. But passing in a drive as the second parameter causes it to crash.

Guess I have some more experimentation to do.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripting Bugs

Post by bdeshi »

And this:

Code: Select all

 text report("{#}, {Name}, {Type}, {Total Size}, {Used Space}, {Free Space}, {Free %}, {Per Cluster}, {Vol Serial}, {File System}","<xydrive>");
 text report("{#}, {Name}, {Type}, {Total Size}, {Used Space}, {Free Space}, {Free %}, {Per Cluster}, {Vol Serial}, {File System}","C:\");
 text report("{#}, {Name}, {Type}, {Total Size}, {Used Space}, {Free Space}, {Free %}, {Per Cluster}, {Vol Serial}, {File System}","C:");
//returns `1, <Drive: C:>, , {Total Size}, {Used Space}, {Free Space}, {Free %}, {Per Cluster}, {Vol Serial}, {File System}`
 text report(,"<xydrive>");
//returns `1			<Drive: C:>																					`
:? Drive Report broke down in more ways than one. Intersetingly, selecting a drive in list and execing text report(,1); seems to work well. :veryconfused:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply