Page 2 of 4

Re: CFA - script for folders only?

Posted: 14 Sep 2015 18:09
by admin
TheQwerty wrote:
admin wrote:You cannot customize the double-click on folders.
Could we have a daredevil tweak that does allow us to customize double-click on folders by forcing them to obey PFA (not just POM)?
OK. You must be crazy. :P

Re: CFA - script for folders only?

Posted: 14 Sep 2015 18:10
by admin
SkyFrontier wrote:\>::msg "It's a folder.";

doesn't work here. (70.0118)
It's POM only (not dbl-click).

Re: CFA - script for folders only?

Posted: 14 Sep 2015 19:03
by SkyFrontier
admin wrote:
SkyFrontier wrote:\>::msg "It's a folder.";

doesn't work here. (70.0118)
It's POM only (not dbl-click).
I know it.
Any other hint?
It's tested on an upgraded installment with minimum customization for test purposes.

Re: CFA - script for folders only?

Posted: 14 Sep 2015 19:38
by autocart
SkyFrontier wrote:\>::msg "It's a folder.";

doesn't work here. (70.0118)
I shows up in the POM (70.0118) if you add it to the PFA definitions, have it activated there and have only folders selected (or a folder selected AND focused if the selection includes files also). EDIT: at least here.

Re: CFA - script for folders only?

Posted: 14 Sep 2015 20:08
by SkyFrontier
All ok here re: conditions.
Does work when called via ctrl+alt+enter but not when ENTER pressed - presumed exception being dbl-clicker only.
"*" for files work as expected, as usual, as ever.

Re: CFA - script for folders only?

Posted: 14 Sep 2015 21:10
by TheQwerty
Nice!

But...

1) :blackstorm: :bug:
In fresh v15.70.0119 with tweak enabled and this PFA:

Code: Select all

\>::msg "Hello<crlf><pfaitem>";
If the folder ends with '.com' instead of triggering the PFA I get an error dialog:
------------------
Not Found: Application
------------------
Could not find:

C:\Temp\New Folder\xyplorer.com

[ Close ]
------------------

2) Is this the closest match to the non-tweak behavior?

Code: Select all

\>::goto <pfaitem>;

Re: CFA - script for folders only?

Posted: 14 Sep 2015 21:25
by admin
1) Fix comes.

2) Yep.

Re: CFA - script for folders only?

Posted: 14 Sep 2015 21:35
by TheQwerty
:bug: Another issue...

With tweak disabled and same PFA entry (thus now a POM entry):

Code: Select all

\>::msg "Hello<crlf><pfaitem>";
Select multiple folders.
Press Enter.

POM entry is executed for the current item.
Without the POM entry then XY opens each folder in an instance of WE. (As reported elsewhere recently.)

EDIT: Oddly in this case if the current item ends with '.com' it does run the PFA entry unlike the other issue.

Re: CFA - script for folders only?

Posted: 15 Sep 2015 08:15
by admin
Fix in next beta.

Re: CFA - script for folders only?

Posted: 15 Sep 2015 09:25
by autocart
v15.70.0119 - 2015-09-14 20:16
+ Portable File Associations: Added tweak PFADefaultOpenFolders to allow
customizing the default action on dbl-click/enter on folders.
PFADefaultOpenFolders=1
Handle with care. You cannot use folders in the list for browsing anymore
when you set this tweak.
They are either opened by a PFA to folders (\ = match any folder) like
this:
\>::msg "It's a folder: <pfaitem>";
Or they are opened by the OS-default (e.g. Windows Explorer, or another
instance of XYplorer).
Woah, :shock:
Don, you are quietly (while you yet let everybody believe that it won't happen) fulfilling dreams (regarding other wishes too). :D
We all stopped hoping and then all of a sudden.. bamm. Wow, cool. :tup:

Re: CFA - script for folders only?

Posted: 15 Sep 2015 09:43
by admin
My personal dream is to publish 15.80... so, if you would be so kind to stop inspiring me with your dreams... :)

Re: CFA - script for folders only?

Posted: 15 Sep 2015 21:38
by nerdweed
Would it be nice to have the tweak this way - if the tweak is set by default double click would still navigate within XY. Set PFA for locations where you actually need something else done. This would remove the need to have a catch all item
\>::goto <pfaitem>;

Re: CFA - script for folders only?

Posted: 15 Sep 2015 22:18
by SkyFrontier
Is this the safest way to go?

*>::msg "It's a file."; run """<pfaitem>""";

0121 tweaked made my day for folders. :tup:

Re: CFA - script for folders only?

Posted: 16 Sep 2015 12:35
by Marco
Crude concept of Deep Browsing™

Code: Select all

\>selectitems "<pfaitem>"; while (property("#itemcount", "<curitem>") == 1) {goto "<curitem>"; sel 1;}; goto "<curitem>";
1. I use selectitems because I browse folders by single clicking the icon, which doesn't select the item which is needed afterwards by <curitem>;
2. I don't rely on folderreport() because you don't know in advance how many items a folder contains, so #itemcount may be faster, also there's no need to parse the results;
3. you won't dive to the deepest level directly, see point 2. Might be an advantage 'cause you see what's going on (albeit very very fast).

Re: CFA - script for folders only?

Posted: 16 Sep 2015 13:55
by TheQwerty
Marco wrote:Crude concept of Deep Browsing™

Code: Select all

\>selectitems "<pfaitem>"; while (property("#itemcount", "<curitem>") == 1) {goto "<curitem>"; sel 1;}; goto "<curitem>";
1. I use selectitems because I browse folders by single clicking the icon, which doesn't select the item which is needed afterwards by <curitem>;
2. I don't rely on folderreport() because you don't know in advance how many items a folder contains, so #itemcount may be faster, also there's no need to parse the results;
3. you won't dive to the deepest level directly, see point 2. Might be an advantage 'cause you see what's going on (albeit very very fast).
I'm currently using:

Code: Select all

"Browse Folder" \>::$item = "<pfaitem>"; while (FolderSize($item, '<d>+<f>', 0) == '1+0') { $item = ListFolder($item, '*', 2); } goto $item;
Though FolderReport could be used as well:

Code: Select all

"Browse Folder" \>::$item = "<pfaitem>"; while (FolderSize($item, '<d>+<f>', 0) == '1+0') { $item = FolderReport('dirs', 'return', $item); } goto $item;
I want to do some testing to see if either is more efficient, but I got side-tracked trying to figure out if I could do better with QuickSearch.

This is mostly because I want to be able to go back once to get out of the jumped folders.