Page 1 of 1

PFA - script variable for processed items?

Posted: 28 Nov 2012 14:04
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...

Re: PFA - script variable for processed items?

Posted: 28 Nov 2012 20:28
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;}

Re: PFA - script variable for processed items?

Posted: 28 Nov 2012 21:03
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).

Re: PFA - script variable for processed items?

Posted: 06 Dec 2012 15:32
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.




.