CFA - script for folders only?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: CFA - script for folders only?

Post by Marco »

Thank you TheQwerty, I really like your PFAs and will use the first one. I didn't know about foldersize(), very useful. Also, I appreciate the fact that when you reach the deepest level there's no autoselected item (as opposed to my concept).
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:Thank you TheQwerty, I really like your PFAs and will use the first one. I didn't know about foldersize(), very useful. Also, I appreciate the fact that when you reach the deepest level there's no autoselected item (as opposed to my concept).
I had "solved" this Folder Jumping issue for myself using a Custom Column. I had ideas for improving it that I wanted to implement before sharing, but I never got there and recently suffered some data loss. (Lesson: Share early - don't chase perfection!)

If memory serves it was similar to what I posted, but included some workarounds for snags I had hit in use. Unfortunately, I cannot remember what they were now (nor the improvements I wanted to make), so I'm going to have to wait until I get bit by them again. :oops: :)

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

Re: CFA - script for folders only?

Post by SkyFrontier »

It seems that if the tweak is set, it's mandatory to set something like
\>::goto <pfaitem>;
otherwise WE will be called for opening folders instead of XY browsing.
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...

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

Re: CFA - script for folders only?

Post by SkyFrontier »

For quick backwards browsing, I'm quite satisfied with this:

Unset BACKSPACE as cks (custom keyboard shortcut); build an UDC (user defined command) with the following code; set BACKSPACE as hotkey (CKS) for it.

Code: Select all

#523; $item = "<curpath>"; if (exists("$item") == "0") { end 1; } elseif {  } while (FolderSize($item, '<d>', 0) <= '1' && FolderSize($item, '<f>', 0) <= '1' && listfolder($item, "*", 32) <= '1') { #523; $item = "<curpath>"; } focus;
Also considering use of "focus" so I can fix the often occurrence of random focus on tree (previously reported).

EDIT: using exists() for a short way to deal with special folders on "drives" list mode.
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...

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

Re: CFA - script for folders only?

Post by nerdweed »

D:\Home\*\>::msg "Hello<crlf><pfaitem>";
This doesn't seem to work.

Also, if by default, a double click navigates within XY, we don't need to have the tweak. If any PFA's are set, they would override the default action which would be (do something;navigate to folder;do something)

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

Re: CFA - script for folders only?

Post by admin »

admin wrote:My personal dream is to publish 15.80... so, if you would be so kind to stop inspiring me with your dreams... :)
BTW, still working on the Help file... ächz. :cup: :cup: :cup: :cup: :cup: :cup: :om:

15.80 will be the biggest release ever, including all major version releases. I almost called it 16.00...

:ghost:

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

Re: CFA - script for folders only?

Post by SkyFrontier »

SkyFrontier wrote:It seems that if the tweak is set, it's mandatory to set something like
\>::goto <pfaitem>;
otherwise WE will be called for opening folders instead of XY browsing.
Problem remains on 15.80.0001.
XY should treat itself as "default" folder opener instead of WE. Always. Bad business to leave breaches for the concurrency, me thinks.
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...

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

Re: CFA - script for folders only?

Post by admin »

SkyFrontier wrote:
SkyFrontier wrote:It seems that if the tweak is set, it's mandatory to set something like
\>::goto <pfaitem>;
otherwise WE will be called for opening folders instead of XY browsing.
Problem remains on 15.80.0001.
XY should treat itself as "default" folder opener instead of WE. Always. Bad business to leave breaches for the concurrency, me thinks.
Which tweak?

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

Re: CFA - script for folders only?

Post by SkyFrontier »

PFADefaultOpenFolders=1
The remark says:
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).
But this is something that should be clearly flagged as *mandatory* to have set a PFA for folders, even in its respective comment on XYini. But I still think this is some sort of bad marketing and certain support pain as in some point in the future there will be users having trouble for this and the tweak will certainly be the last thing one will find as the one to blame for the abnormal behavior.
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...

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

Re: CFA - script for folders only?

Post by admin »

That was the idea of the tweak. Don't use it if you don't like it. Shrug.

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

Re: CFA - script for folders only?

Post by TheQwerty »

admin wrote:That was the idea of the tweak. Don't use it if you don't like it. Shrug.
I think there is some merit to what SkyFrontier is saying though.

If the user enables the tweak but doesn't have a pattern that matches the folder why not have XY default to browsing to it instead of opening the system default? Especially since enabling the tweak but disabling Open Item by First 'Open with...' Match, which I view as a Use System Default toggle, browses to the folder in XY instead of using the system default.

If non-matching folders were still browsed to by XY, then the tweak itself becomes more of a safety belt formality. (Of course I imagine we're making an absolutely nightmarish assortment of code-flows in some method. :P )

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

Re: CFA - script for folders only?

Post by admin »

PFA/POM is about opening something with some application. Browsing a location within XY is something different in my eyes. And also in the code's eyes. This would be a nightmare to code and totally ridiculuous since it would just take away what was added by the tweak. I rather remove the tweak -- remember that I was against it anyway in the first place. I should have listended to my intuition. It's was a bad tweak.

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

Re: CFA - script for folders only?

Post by TheQwerty »

admin wrote:ridiculuous since it would just take away what was added by the tweak.
Not entirely, what SkyFrontier is suggesting is just that browsing in XY should be the default if no PFA matches. That last part is what the tweak adds.
admin wrote:I rather remove the tweak -- remember that I was against it anyway in the first place. I should have listended to my intuition. It's was a bad tweak.
Please don't.
I think the tweak is fine as it is now and quite powerful.
Give us some time to prove we can handle it responsibly!

I cannot imagine XY gaining CEA without support for OnBrowseToLocation, so if nothing else this tweak can help test-bed what that would be like. Which might be useful when you get there on the roadmap.

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

Re: CFA - script for folders only?

Post by SkyFrontier »

TheQwerty wrote:
admin wrote:I rather remove the tweak -- remember that I was against it anyway in the first place. I should have listended to my intuition. It's was a bad tweak.
Please don't.
Please don't! I'm finally in peace with traversing numerous nonsensical empty folders back-and-forth to-from meaningful content, saving countless clicks a day due to this little XY-unique gem! (hint: all developers of the world should buy XY since the tweak was added, by the way)
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...

admin
Site Admin
Posts: 60357
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:ridiculuous since it would just take away what was added by the tweak.
Not entirely, what SkyFrontier is suggesting is just that browsing in XY should be the default if no PFA matches. That last part is what the tweak adds.
OK, I saw a way now to make it happen. Yes, makes total sense. Excuse my black out... :ninja: ... next beta...

Post Reply