Scripting Bugs

Things you’d like to miss in the future...
Forum rules
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Bugs

Post by admin »

What result would you expect?

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

Re: Scripting Bugs

Post by TheQwerty »

That they would more closely resemble the results shown for the scripts marked "Correct". ;)
[i]Load A;B - Confused > A[/i] wrote:Myself:
Text "Myself:<crlf>" . Self('script') . "<crlf 2>Caller:<crlf>" . Caller('script');

Caller:
Load '*', 'A;B';
[i]Load A;B - Confused > B[/i] wrote:Myself:
B


Caller:
Load A;B - Confused

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

Re: Scripting Bugs

Post by admin »

I have to postpone this.

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

Re: Scripting Bugs

Post by TheQwerty »

admin wrote:I have to postpone this.
Hmm... When shall I remind you?

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

Re: Scripting Bugs

Post by admin »

After 13.90.

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

Re: Scripting Bugs

Post by TheQwerty »

FormatList only filters by first item when separator is CRLF.

Code: Select all

"FormatList Comparisons"
 Global $G_SEP, $G_RESULT;
 $result = '';

 $G_SEP = ';';      Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
 $G_SEP = '|';      Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>"; 
 $G_SEP = '--';     Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
 $G_SEP = '++';     Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
 $G_SEP = "<crlf>"; Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";

 Text $result;

"_filter"
  Global $G_SEP;
  $list = 'a' . $G_SEP . 'ba' . $G_SEP . 'ac' . $G_SEP . 'ed';
  $filter = 'a*' . $G_SEP . '*d';

  Global $G_RESULT = FormatList($list, 'f', $G_SEP, $filter);

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

Re: Scripting Bugs

Post by admin »

TheQwerty wrote:FormatList only filters by first item when separator is CRLF.
Confirmed! True for all separators larger than one character (and the characters bing different). Fix comes.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Scripting Bugs

Post by SkyFrontier »

report() seems to be accepting 1 or 0 as parameter, but not |-separated lists.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Scripting Bugs

Post by LittleBiG »

SkyFrontier wrote:report() seems to be accepting 1 or 0 as parameter, but not |-separated lists.
It works here. Did you use full path names?

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Scripting Bugs

Post by SkyFrontier »

Yep.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Scripting Bugs

Post by SkyFrontier »

Code: Select all

 step;
   $inp = folderreport("files:{fullname}", "r", , "", , "|");

   $input = trim("$inp", "|");

   $input = report("{custom 2} = {fullname}|", "$input"); // custom 2 won't be caught
   $a = report("{custom 2} = {fullname}|", 0); // correct
beta 0113.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Scripting Bugs

Post by SkyFrontier »

Code: Select all

    $src = "*item*item2*";
    $src = trim("$src", "*"); //problem happens here
    echo "$src";
XY freezes.

beta 0113.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

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

Re: Scripting Bugs

Post by admin »

SkyFrontier wrote:

Code: Select all

    $src = "*item*item2*";
    $src = trim("$src", "*"); //problem happens here
    echo "$src";
XY freezes.

beta 0113.
Indeed! Fixed:

Code: Select all

    ! SC trim: Freeze on passing "*" as charlist. Fixed.
    * SC trim: From now on when passing "*" or "?" as charlist they are 
      automatically treated as verbatim characters, not as wildcards.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Scripting Bugs

Post by SkyFrontier »

Paste this into AB:

Code: Select all

echo gettoken ("<clipboard>", count, "<crlf 
< mind the extra space at the end!
('echo gettoken ("<clipboard>", count, "<crlf ')

Now, enter a digit.
XY freezes.

beta 0113 (and earlier, can't track down).
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

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

Re: Scripting Bugs

Post by admin »

Confirmed! You have a good run today...

Post Reply