Error 91 on paperfolder after execution of a script

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 strongly 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, and we won't have to search for that vital information.

: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:
Post Reply
zakhar
Posts: 179
Joined: 08 Sep 2010 21:13

Error 91 on paperfolder after execution of a script

Post by zakhar »

Hello, dear XYplorer Community!

I seem to find a bug. Steps to reproduce:

1. load a paperfolder with some folders in it,
2. execute the script - the aim of the script is to open the found 1st level subfolders.
(Running this script after a paperfolder was loaded was a random event.)

Code: Select all

 $firstFolder = "<curpath>";
 $qs1 = quicksearch(" /dn","<curpath>");
 $qs1count = gettoken($qs1,"count",<crlf>);
 $i1 = 1;
 while($i1 <= $qs1count){
    $folder = gettoken($qs1,$i1,<crlf>);
    goto "$folder";
    $i1++;
 }
 goto "$firstFolder";
 
3. result:
-1. Error 91,
-2. XYplorer will not show anything in it's list - everywhere.
XYplorer must be restarted to terminate this behavior.
Bug-91.jpg
To see the attached files, you need to log into the forum.

highend
Posts: 14993
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Error 91 on paperfolder after execution of a script

Post by highend »

That might be not handled very gracefully and should be changed but at the same time you are responsible for what the script is doing. So why do you think that a quicksearch in "paper:<name of the paperfolder>" would lead to any usable result?
One of my scripts helped you out? Please donate via Paypal

zakhar
Posts: 179
Joined: 08 Sep 2010 21:13

Re: Error 91 on paperfolder after execution of a script

Post by zakhar »

highend wrote: 06 Oct 2021 16:57 So why do you think that a quicksearch in "paper:<name of the paperfolder>" would lead to any usable result?
Where did you find this in my text, highend?
You seem to have not respect this text line:
zakhar wrote: 06 Oct 2021 16:43 (Running this script after a paperfolder was loaded was a random event.)

highend
Posts: 14993
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Error 91 on paperfolder after execution of a script

Post by highend »

I didn't miss anything here. Just prevent your script doing a search in paperfolder
One of my scripts helped you out? Please donate via Paypal

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

Re: Error 91 on paperfolder after execution of a script

Post by admin »

SC quicksearch supports Paper Folders, see this example in the Help:
Search paperfolder "echo" non-recursively:
text quicksearch("*.jpg /n", "paper:echo");
However, it stopped working when "Explicit Save Only" was introduced (what a can of worms!). So it's a bug. :bug: Fixed in next beta.

highend
Posts: 14993
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Error 91 on paperfolder after execution of a script

Post by highend »

I didn't imply that as a: Do this forever but as a workaround for the bug^^
One of my scripts helped you out? Please donate via Paypal

Post Reply