scripting-bug with PFA

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

: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: Use Your Profile Or Signature
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: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
autocart
Posts: 1422
Joined: 26 Sep 2013 15:22

scripting-bug with PFA

Post by autocart »

I tried to couple portable file associations with scripting, as mentioned in this post (http://www.xyplorer.com/xyfc/viewtopic. ... 742#p97049):
"Load Search" C:\....\XYplorer-data\FindTemplates\*.ini>::LoadSearch "<curbase>", 'rlec';
Then I reference the ini-file by way of the catalog.
On clicking it in the catalog the search opens fine.
If I leave the search tab open, though, and (happen to) click the ini-file in the catalog again, then I get the error as shown in the picture.
To see the attached files, you need to log into the forum.

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

Re: scripting-bug with PFA

Post by admin »

Sorry, but I have not time to setup this scenario. Can you somehow isolate the error? The problem seems to be that <curbase> is resolved to nothing because there is no current file selected.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: scripting-bug with PFA

Post by Stefan »

@autocart


There is one little difference between your code, guessed from screenshot, and "TheQwerty" code (linked by you)

TheQwerty wrote:
1. PFA/POM allow you to use paths in your pattern meaning you could configure XY such that opening an INI file within the FindTemplate directory would perform a LoadSearch script:

Code: Select all

"Load Search" C:\Zen\Apps\XYplorer\Data\FindTemplates\*.ini>::LoadSearch "<curbase>", 'rle';
You'll need to replace C:\Zen\Apps\XYplorer\Data with the real location of your <xydata> since it seems XY-variables don't work here.



I don't have tested it myself, but the asterisk (*) may be mandatory here?


.

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

Re: scripting-bug with PFA

Post by autocart »

I do have an asterisk in my line of code in the PFA-definition.


Post Reply