<pfaitem> items are passed one-by-one?
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
Currently not. This would be MAJOR for you and me.
FAQ | XY News RSS | XY X
-
binocular222
- Posts: 1423
- Joined: 04 Nov 2008 05:35
- Location: Win11, Win10, 100% Scaling
Re: <pfaitem> items are passed one-by-one?
No need to change #160, just change PFA as Sammay suggestSammaySarkar wrote:I think PFA can benefit from a mechanism where the PFA (script) is called only once, by some kind of notation like the existing |-prefix to disable auto-execute.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
Just to clarify:
I think PFA can benefit from a mechanism where the PFA (script) is called only once even when multiple items are selected, by some kind of notation like the existing |-prefix to disable auto-execute.
I think PFA can benefit from a mechanism where the PFA (script) is called only once even when multiple items are selected, by some kind of notation like the existing |-prefix to disable auto-execute.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
Just to clarify: It's not PFA. It's "Open Selected Item(s)" that does the calls. No change in PFA can possibly affect this.
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
Darn. Guess we'll have to make do with giant scripts.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
I thought about it again. The "Open Selected Item(s)" code is almost 10 years old. It might just be about time to change it a little. I just cannot see a good reason anymore why it behaves so differently from the "Open With..." code. And worse, I just cannot see a good reason why all selected items should be opened one by one.
So, this will be changed experimentally. Let's see if it survives the weekend.
So, this will be changed experimentally. Let's see if it survives the weekend.
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
Thanks for the consideration, but now PFI PFA isn't available for multiple selection. Looks like a vicious circle.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
It's consistent now. What is not working anymore. Example?
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
Oh it's working alright, but:
single selection, ENTER: PFA assoc.
plural selection, ENTER: System assoc. (apparently).
minor security risk too. (why? I have a bat;cmd;vbs... pfa to open them in notepad. Now multisel+return executes them.)
single selection, ENTER: PFA assoc.
plural selection, ENTER: System assoc. (apparently).
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
Give a concrete example. Under the hood this is very complex. I need exact data to respond.
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
example PFAexample BATsNow select one bat and enter. then select all bats and enter.
Code: Select all
+bat;cmd;vbs;wsh>notepadCode: Select all
::$str = '%COMSPEC% /K echo %0% says hello!'; writefile('a.bat', $str, r); writefile('b.bat', $str, r); writefile('c.bat', $str, r);Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
Whoops, that was not the plan.
! Fix coming soon.
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
programs are sent selected files as space-separated args. (sidenote: if this persists, <pfaitem> needs a clone <pfaitems> to be grammatically correct
)
Scripted PFAs just seems to trigger once for the focused item.
Almost there, now all that's missing is a way to somehow toggle between current and previous behavior: exec pfa once-for-all/exec pfa one-by-one for all.
Scripted PFAs just seems to trigger once for the focused item.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <pfaitem> items are passed one-by-one?
1. That's by design. <pfaitem> is the item that determines the opening application/script. The script then can handle all selected items.SammaySarkar wrote:programs are sent selected files as space-separated args. (sidenote: if this persists, <pfaitem> needs a clone <pfaitems> to be grammatically correct)
Scripted PFAs just seems to trigger once for the focused item.
Almost there, now all that's missing is a way to somehow toggle between current and previous behavior: exec pfa once-for-all/exec pfa one-by-one for all.
2. You mean a setting in configuration? And, why would a multiple instance call of same-type items be necessary? Do you have a specific case?
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: <pfaitem> items are passed one-by-one?
OK, OK. This part is what I wished for, But here's a bug: it works only as long as all selected files match the PFA.admin wrote:1. That's by design. <pfaitem> is the item that determines the opening application/script. The script then can handle all selected items.
Code: Select all
+bat>::echo <pfaitem>;
+txt>notepadIcon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
XYplorer Beta Club