CFA - script for folders only?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: CFA - script for folders only?

Post 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

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: CFA - script for folders only?

Post by admin »

SkyFrontier wrote:\>::msg "It's a folder.";

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

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: CFA - script for folders only?

Post 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.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

autocart
Posts: 1248
Joined: 26 Sep 2013 15:22

Re: CFA - script for folders only?

Post 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.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: CFA - script for folders only?

Post 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.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

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

Re: CFA - script for folders only?

Post 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>;

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: CFA - script for folders only?

Post by admin »

1) Fix comes.

2) Yep.

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

Re: CFA - script for folders only?

Post 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.

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: CFA - script for folders only?

Post by admin »

Fix in next beta.

autocart
Posts: 1248
Joined: 26 Sep 2013 15:22

Re: CFA - script for folders only?

Post 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:

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: CFA - script for folders only?

Post by admin »

My personal dream is to publish 15.80... so, if you would be so kind to stop inspiring me with your dreams... :)

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

Re: CFA - script for folders only?

Post 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>;

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: CFA - script for folders only?

Post by SkyFrontier »

Is this the safest way to go?

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

0121 tweaked made my day for folders. :tup:
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: CFA - script for folders only?

Post 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).
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

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

Re: CFA - script for folders only?

Post 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.

Post Reply