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:
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripting Bugs

Post by TheQwerty »

Code: Select all

::Echo Report('{Name}');Echo Report('{Name}',1);Echo Report('{Name}','C:\');Echo Report('{Name}','C:');Echo Report('{Name}',"<xydrive>");
The itemlist parameter was introduced in v9.30.0022 which I do not have, but in v9.30.0023 it was combined with the onlyselected parameter and we have that archive.

Since then the behavior has changed 3 times:
Versions					0 - List		1 - Selection	'C:\'			'C:'		"<xydrive>"
v09.30.0023 - v13.70.0122		Label (Letter:)	Label (Letter:)	<Drive: C:\>	<Drive: C:>	<Drive: C:>
v13.70.0123 - v13.80.0101		Label (Letter:)	Label (Letter:)	Crash		Crash		Crash
v13.80.0102 - v14.20.0308		Label (Letter:)	Label (Letter:)	Blank		Blank		Blank
v14.20.0309 - Present		Label		Label		Crash		Crash		Crash

:veryconfused:
And then as Sammay has shown the behavior seems to even differ more from this if other templates are used. Sorry I'm not going to collate that data. :P

Good luck Don! :wink: :cup:

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

TheQwerty wrote:
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.
Me too. But cannot explain. This is a system dialog after all. I cannot fix it. Weird. :veryconfused:

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

Re: Scripting Bugs

Post by bdeshi »

As I said, it's a "WEight". :)
But still, it only seems to happen in XY.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

TheQwerty wrote: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.
This never crashes here.

And this never worked in any version AFAIK:

Code: Select all

text report("{#}, {Name}, {Type}, {Total Size}, {Used Space}, {Free Space}, {Free %}, {Per Cluster}, {Vol Serial}, {File System}","<xydrive>");
:?

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

Re: Scripting Bugs

Post by bdeshi »

admin wrote:And this never worked in any version AFAIK:

Code: Select all

...

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_report";
Subheading "Using the template" -> Drives Mode
says they're useable. :?

And they work indeed, if the active pane is in drives mode (This PC). The bug causes a crash if a drive letter is explictly passed as the second parameter.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

OK, I got and fixed the crash.

Drive properties are usable in report, but not with "itemlist" parameter. Only with current drives listing. Will add that info to help.

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

Re: Scripting Bugs

Post by TheQwerty »

Also, was there a reason the drive letter was removed from the {Name}?

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

TheQwerty wrote:Also, was there a reason the drive letter was removed from the {Name}?
Bug. :bug:

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

Re: Scripting Bugs

Post by TheQwerty »

Tag and TagItems make it too easy to create orphan entries by accepting paths with trailing backslashes.

Code: Select all

"test"
  $d = "<xydata>\Catalogs";
  goto "$d\..";
  SetColumns('Name,Tags');
  Tag 'A',"$d\", 1, 0; // Note the trailing backslash.
  Tag 'B',$d, 1, 0;
I expected:

Code: Select all

?:\XYplorer-Test\Data\Catalogs|0|A, B||||||
But instead got:

Code: Select all

?:\XYplorer-Test\Data\Catalogs|0|B||||||
?:\XYplorer-Test\Data\Catalogs\|0|A||||||
Even more "fun" put either SC in a Custom Column in hopes of automatically tagging '<cc_path>' and watch XY get stuck in a tagging frenzy that ends with a crash.

Snippet:

Code: Select all

Snip: CustomColumn 1
  XYplorer 14.40.0318, 9/16/2014 2:06:23 PM
Action
  ConfigureColumn
Caption
  Crash
Type
  3
Definition
  Tag 'Bye-Bye', <cc_path>, 1, 0;
Format
  0
Trigger
  1
Item Type
  2
Item Filter
  
[/size]


EDIT: Similar crash can be caused by updating the ColorFilters in each item with List Trigger - Browser trigger is fine.
Snippet:

Code: Select all

Snip: CustomColumn 1
  XYplorer 14.40.0318, 9/16/2014 3:47:23 PM
Action
  ConfigureColumn
Caption
  
Type
  3
Definition
  ColorFilter(ColorFilter() . "||*<cc_item>>FF0000");
Format
  0
Trigger
  1
Item Type
  2
Item Filter
  
[/size]

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

Both fixed in next beta. Thanks!

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Scripting Bugs

Post by nerdweed »

Oops. I posted it as new thread instead of here (which should be deleted)

1. MoveTo - It allows moving files with a wildcard pattern. Great.
If there are tagged items, it doesn't move the tags resulting in orphaned tags - Bad.

2. MoveAs (It should be impacting CopyAs as well)
MoveAs Pattern, TargetPath, itemlist
e.g.; MoveAs "Funky", "D:\Fun", "D:\ReadMe.txt|D:\Error.txt|D:\Fun.txt"

If there are no files like Funky.txt in the folder D:\Fun - it should move the files as Funky.txt, Funky (2).txt, Funky (3).txt - instead it starts with Funky (2).txt and ends at Funky (4).txt

3. Tags are also lost on using the SC rename. RenameItem preserves it fine.
Last edited by bdeshi on 18 Sep 2014 16:25, edited 1 time in total.
Reason: deleted linked dupe thread and link

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

Re: Scripting Bugs

Post by bdeshi »

^that^ reminds me.
There is some amount of discrepancy between file ops SCs regarding usage of system variables.
Here's a snippet from my notes: (Y/N: works correctly/not)

Code: Select all

 /*backupto|moveto|*/copyto "%desktop%"; Y
 /*moveas|*/copyas '*', %tmp%; Y
 /*moveas|*/copyas '*', %desktop%; N, can't create folder
 copyitem , "%tmp%\test.copy"; Y
 copyitem , "%desktop%\test.copy"; N, creates desktop\ folder in curpath
 new("%desktop%\test.file",file); N, creates desktop\ folder in curpath
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

nerdweed wrote:Oops. I posted it as new thread instead of here (which should be deleted)

1. MoveTo - It allows moving files with a wildcard pattern. Great.
If there are tagged items, it doesn't move the tags resulting in orphaned tags - Bad.

2. MoveAs (It should be impacting CopyAs as well)
MoveAs Pattern, TargetPath, itemlist
e.g.; MoveAs "Funky", "D:\Fun", "D:\ReadMe.txt|D:\Error.txt|D:\Fun.txt"

If there are no files like Funky.txt in the folder D:\Fun - it should move the files as Funky.txt, Funky (2).txt, Funky (3).txt - instead it starts with Funky (2).txt and ends at Funky (4).txt

3. Tags are also lost on using the SC rename. RenameItem preserves it fine.
1. That's impossible to do. I added a note to Help.
2. Cannot confirm.
3. Cannot confirm.

admin
Site Admin
Posts: 65060
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

SammaySarkar wrote:^that^ reminds me.
There is some amount of discrepancy between file ops SCs regarding usage of system variables.
Here's a snippet from my notes: (Y/N: works correctly/not)

Code: Select all

 /*backupto|moveto|*/copyto "%desktop%"; Y
 /*moveas|*/copyas '*', %tmp%; Y
 /*moveas|*/copyas '*', %desktop%; N, can't create folder
 copyitem , "%tmp%\test.copy"; Y
 copyitem , "%desktop%\test.copy"; N, creates desktop\ folder in curpath
 new("%desktop%\test.file",file); N, creates desktop\ folder in curpath
Thanks, all confirmed and fixed.

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Scripting Bugs

Post by nerdweed »

admin wrote:
nerdweed wrote:Oops. I posted it as new thread instead of here (which should be deleted)

1. MoveTo - It allows moving files with a wildcard pattern. Great.
If there are tagged items, it doesn't move the tags resulting in orphaned tags - Bad.

2. MoveAs (It should be impacting CopyAs as well)
MoveAs Pattern, TargetPath, itemlist
e.g.; MoveAs "Funky", "D:\Fun", "D:\ReadMe.txt|D:\Error.txt|D:\Fun.txt"

If there are no files like Funky.txt in the folder D:\Fun - it should move the files as Funky.txt, Funky (2).txt, Funky (3).txt - instead it starts with Funky (2).txt and ends at Funky (4).txt

3. Tags are also lost on using the SC rename. RenameItem preserves it fine.
1. That's impossible to do. I added a note to Help.
2. Cannot confirm.
3. Cannot confirm.
1. OK
2. Please see the GIF on fresh. Easily reproducible. Only setting changed was template
3. I was doing a move on rename and the latest version disallows batch move and rename. So no point discussing this.
CopyAs.gif
CopyAs.gif (39.23 KiB) Viewed 1777 times

Post Reply