PFA/POM: Use System Default

Features wanted...
Post Reply
TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

PFA/POM: Use System Default

Post by TheQwerty »

TL;DR: Can we please have a (better) way to create PFAs that use the system default?

------

While cleaning up my portable file associations, finally converting many to use generic file types, I stumbled over a conundrum.

I have Visual Studio Solutions (sln) added to Text Files so that I can preview them in XY.
I have a PFA to open text files, now using the GFT:

Code: Select all

"Sublime" {:Text}>sublime-text.exe
But I want to override that and use the system default for sln files.


My current options are:
  1. Don't use the GFT - which means a long list of extensions, complicated management, and is just really ugly and sad.
  2. Don't preview sln as text - not a terrible option with Raw Text so readily available.
  3. Override the text PFA with a higher-priority one.
The last is perfect, unless you want to override it with the system default - then it is not intuitive and less-than-ideal:

Code: Select all

sln><pfaitem>
sln>::#1053; // Open Selected Item(s) with OS Default
sln>:://some other script/UDC solution.
Unfortunately, all of these make your POM less useful by showing the script/sln icon and caption instead of the system default's as the default action.

We need a better way!

I think Stef123 had the right idea in this thread - we need a way to create a "use system default" PFA.

%system_default% is too much like an environment variable, but I'm sure we can come up with something that would work:

Code: Select all

sln>
"Or..." sln>*
"Or Even" sln>!default
This shouldn't be too problematic as it becomes an early false return when XY's checking for a matching PFA.

The only other solution I can see would be a way to define exclusion patterns in PFA, but that's really ugly and would have a far greater/worse impact.

Please Don, you're our only hope! :whistle:

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

Re: PFA/POM: Use System Default

Post by SkyFrontier »

+1.

Last week I was badly needing something like
txt> <txt2>; run """\path\to\sublime""";
txt2> <script>
txt> <txt2>; notepad; //ie, process script referenced by <script> at txt2, then open it with notepad.

Thus, position would not be a requisite anymore. :!:
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: 4353
Joined: 03 Aug 2007 22:30

Re: PFA/POM: Use System Default

Post by TheQwerty »

Found myself irritated by this again today.

Any thoughts, Don?

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

Re: PFA/POM: Use System Default

Post by nerdweed »

One quick way (only in details view) would be having a tiny Custom Column (trigger based) that would trigger open with OS default (#1053)

eil
Posts: 1260
Joined: 13 Jan 2011 19:44

Re: PFA/POM: Use System Default

Post by eil »

2 small ideas:
- how about adding a line with higher priority, stating path to default OS program but with | on start =meant items will not be opened with this usually, but it will be first in "Open With" list.
- or same but with mentioned #1053

otherwise, it's only up to custom collumn with script..

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

Re: PFA/POM: Use System Default

Post by TheQwerty »

Guys, I appreciate all the suggestions, but I'm choosing to be picky on this. ;)

A Custom Column could work but requires changing behavior and only catches one instance of opening the item. Plus it doesn't work outside of details view and requires a dedicated column.

A custom toolbar button, UDC, or script would also work but it has similar problems.

Explicitly using the system default in the PFA works, but is no longer portable.
Using a PFA to a script or just #1053; also works but now my POM is generic and ugly, or not portable.

admin
Site Admin
Posts: 50916
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: PFA/POM: Use System Default

Post by admin »

Next beta you can use # for this (# looks a bit like a window -> Windows associated app):

Code: Select all

sln>#
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: PFA/POM: Use System Default

Post by TheQwerty »

Sneaking it in before the one-year mark, huh? :P :wink:

*gleeful anticipation*

starstuff
Posts: 26
Joined: 07 May 2015 15:30

Re: PFA/POM: Use System Default

Post by starstuff »

could this be made more intelligent by adding an option in which it knows what is an allowed system default?

example scenario:

pdf reading
you dont like using/reading on adobe reader, you much prefer using/reading on pdf-xchanger reader

2 computer, work / home computers

work computer - default adobe reader - cannot change the default - use the portable version of pdf-xchange reader
home computer - defaut pdf-xchange reader

it could be something like
pdf>#, pdf-xchange, USB:\apps\pdf-xchange\pdf-xchange.exe

it will check if the default is pdf-xchange if not then run pdf-xchange portable
in our scenario, the work computer will use the pdf-xchange portable version, while the home computer will use the system default

SammaySarkar
Posts: 4235
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: PFA/POM: Use System Default

Post by SammaySarkar »

starstuff wrote:could this be made more intelligent by adding an option in which it knows what is an allowed system default? ...
Me thinks that too much smartness. Just use a PFA that chooses between Acrobat and PDFX.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply