PFA - script variable for processed items?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
highend
Posts: 13338
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

PFA - script variable for processed items?

Post by highend »

Hey,

I want to add another PFA, some sort of "last resort" when all other items don't match.

E.g.:

Code: Select all

"OpenUnknown" *>::load "<xyscripts>\OpenUnknownFiles.xys";
and ofc it's the last entry (with others on top of it, that open sound / video, etc..).

For each selected file in a pane, this script get's executed by XYplorer so I don't need
a foreach loop in it. But what I'd like to know, what's the variable name, with which I can
process the different entries?

<curitem> isn't the right one...
One of my scripts helped you out? Please donate via Paypal

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

Re: PFA - script variable for processed items?

Post by Stefan »

H> For each selected file in a pane, this script get's executed by XYplorer so I don't need a foreach loop in it.
I think the PFA gets executed only onces, no matter if one or more files are selected.

H> But what I'd like to know, what's the variable name, with which I can process the different entries?
Which "different entries"? The different selected files?
I think the called app has to do the logic. In your case your OpenUnknownFiles.xys.

PFA

Code: Select all

+"OpenUnknown" *>::load "<xyscripts>\OpenUnknownFiles"
XYplorer\Data\Scripts\OpenUnknownFiles.xys

Code: Select all

foreach($FILE, <get selecteditemsnames |>){msg $FILE,1;}

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

Re: PFA - script variable for processed items?

Post by highend »

Thanks Stefan.
I think the PFA gets executed only onces, no matter if one or more files are selected.
As long as the PFA is defined as
"OpenUnknown" *>::load "<xyscripts>\OpenUnknownFiles.xys"
the script can contain only one statement, e.g.:

Code: Select all

msg a;
and when I select more than one file, I get two popups with "a".

What does the + sign in front of your PFA do? The help file doesn't mention it in the PFA section.

Maybe it's just my wrong understanding of how to define it correctly?
Which "different entries"? The different selected files?
Yeah.
I think the called app has to do the logic. In your case your OpenUnknownFiles.xys.
That's how I handled it (with a foreach loop), but the script is called x times (depending of the amount
of selected files).
One of my scripts helped you out? Please donate via Paypal

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

Re: PFA - script variable for processed items?

Post by Stefan »

highend wrote: What does the + sign in front of your PFA do? The help file doesn't mention it in the PFA section.
That + plus sign is just the equivalent to the [X] check box in the PFA dialog.




.

Post Reply