Page 26 of 41

Re: Scripting Bugs

Posted: 28 Jul 2014 18:24
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?

Re: Scripting Bugs

Posted: 28 Jul 2014 19:39
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.

Re: Scripting Bugs

Posted: 28 Jul 2014 20:24
by bdeshi
Select a file, then double-click a folder in the same location. What happens now?

Re: Scripting Bugs

Posted: 28 Jul 2014 21:14
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?

Re: Scripting Bugs

Posted: 29 Jul 2014 06:20
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)

Re: Scripting Bugs

Posted: 29 Jul 2014 12:39
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

Re: Scripting Bugs

Posted: 29 Jul 2014 13:09
by bdeshi
alright. I'll chalk it up a problem with my current setup then.

Re: Scripting Bugs

Posted: 29 Jul 2014 14:35
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.

Re: Scripting Bugs

Posted: 29 Jul 2014 14:44
by bdeshi
First thing I tried. This only occurs in XY.
Also happens in fresh, and in a different copy of XY.

Re: Scripting Bugs

Posted: 29 Jul 2014 14:53
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.

Re: Scripting Bugs

Posted: 05 Aug 2014 11:02
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.

Re: Scripting Bugs

Posted: 05 Aug 2014 16:05
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.

Re: Scripting Bugs

Posted: 05 Aug 2014 17:37
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.

Re: Scripting Bugs

Posted: 05 Aug 2014 18:54
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.

Re: Scripting Bugs

Posted: 05 Aug 2014 19:17
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: