Page 1 of 1

PFA/POM: Use System Default

Posted: 24 Jun 2015 18:06
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:

Re: PFA/POM: Use System Default

Posted: 24 Jun 2015 20:48
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. :!:

Re: PFA/POM: Use System Default

Posted: 11 Nov 2015 21:39
by TheQwerty
Found myself irritated by this again today.

Any thoughts, Don?

Re: PFA/POM: Use System Default

Posted: 11 Nov 2015 21:58
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)

Re: PFA/POM: Use System Default

Posted: 12 Nov 2015 11:43
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..

Re: PFA/POM: Use System Default

Posted: 12 Nov 2015 14:26
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.

Re: PFA/POM: Use System Default

Posted: 02 Jun 2016 20:31
by admin
Next beta you can use # for this (# looks a bit like a window -> Windows associated app):

Code: Select all

sln>#

Re: PFA/POM: Use System Default

Posted: 02 Jun 2016 20:49
by TheQwerty
Sneaking it in before the one-year mark, huh? :P :wink:

*gleeful anticipation*

Re: PFA/POM: Use System Default

Posted: 03 Jun 2016 05:39
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

Re: PFA/POM: Use System Default

Posted: 03 Jun 2016 06:27
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.