PFA match all folders

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
binocular222
Posts: 1419
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

PFA match all folders

Post by binocular222 »

In Help file: "To match all folders use a single \ (backslash)." I tried this PFA:

Code: Select all

\>::echo Hi
- When press Enter, the folder is open (PFA is ignored?!)
- When press Ctrl+Enter, PFA menu popup, the entry with above code does showup, selecting this entry will trigger ::echo Hi
=> Does the PFA is ignored when pressing Enter?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: PFA match all folders

Post by nerdweed »

Default PFA was never intended for folders. Its always browsed to using XY.

If it would have been, CEA would have been in place as well :whistle:

binocular222
Posts: 1419
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: PFA match all folders

Post by binocular222 »

Mat I make a wish?
Or there;s any trick to "Do some script instead of opening folders"?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: PFA match all folders

Post by nerdweed »

When I had gone to the changelog, it did mention that it is not for for folders. It is Portable File Association after all.

I wish for it too - it will open a world full of possibilities if this can be done. It would allow to hook our scripts to folders.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: PFA match all folders

Post by TheQwerty »

I cannot think of any way to achieve this with PFAs today, and I'm not sure Don will give us the power to so easily break basic navigation of the file system. :?


Your next bet is either to run the script instead of entering the folder, so it can do whatever you want on the selection and then enter the folder. The script could even then be put into a Custom Column with click trigger so that you can trigger it from within the list, though I'm not sure how or even if you can trigger a CC via keyboard.


If you only want to do this script when entering certain folders you could use a hacky solution where you dedicate a Custom Column to the script, use Folder View Settings to only show that column when browsing the locations you want to trigger it, and then use a script like the following. However, this won't work when the folder is empty.

Code: Select all

// Tracks when this script is triggered.
// This way we can restrict running to
// the first item in the list.
perm $P_LAST_ENTERED;
  if ($P_LAST_ENTERED != '') {
    // If triggered within the last minute abort.
    if (DateDiff($P_LAST_ENTERED,, 'n') < 1) {
      return;
    }
  }
  $P_LAST_ENTERED = now();

  // Whatever script you want...
  echo 'hi';
Snippet:

Code: Select all

Snip: CustomColumn 1
  XYplorer 14.10.0112, 6/5/2014 8:31:52 AM
Action
  ConfigureColumn
Caption
  Folder Script
Type
  3
Definition
  // Tracks when this script is triggered.
  // This way we can restrict running to
  // the first item in the list.
  perm $P_LAST_ENTERED;
    if ($P_LAST_ENTERED != '') {
      // If triggered within the last minute abort.
      if (DateDiff($P_LAST_ENTERED,, 'n') < 1) {
        return;
      }
    }
    $P_LAST_ENTERED = now();
  
    // Whatever script you want...
    echo 'hi';
Format
  0
Trigger
  0
Item Type
  2
Item Filter
  
[/size]

Post Reply