User Buttons as Open-With Panels - File name only

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

User Buttons as Open-With Panels - File name only

Post by aurumdigitus »

Have just started using User Buttons as Open-With Panels and find it unexpectedly handy.

When invoking the drop-down list is there a way to suppress the full path and show only the file name?

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: User Buttons as Open-With Panels - File name only

Post by Stefan »

Can you show your button code?

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

Re: User Buttons as Open-With Panels - File name only

Post by admin »

(FYI: http://www.xyplorer.com/release_10.60.h ... thdropdown)

Yes, brilliant feature. I'm glad I'm finally getting some feedback on it. :D

No, "filenames only" is not possible. Where should I add this option? If you have an idea I'll add it.

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: User Buttons as Open-With Panels - File name only

Post by aurumdigitus »

The rationale for idea was that since these files are well known to the user (or they wouldn't have been placed in the list in the first place) the name alone is sufficient for identification and having to view the full path name clutters up the drop-down list.

Could it be done by parsing if say the file name per se is delimited by special symbols {like this}?

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

Re: User Buttons as Open-With Panels - File name only

Post by TheQwerty »

Why not detect the normal script caption? Or is that what you're using to differentiate?

Then the user could define the names and icons:

Code: Select all

"File A" C:\Some\where\deep\below.txt
"File B|notepad.exe" C:\this\is\not\notepad.exe
It's not the nice automatically trimmed to file name only that aurumdigitus is after but it would be a step in that direction.

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: User Buttons as Open-With Panels - File name only

Post by aurumdigitus »

TheQwerty wrote:It's not the nice automatically trimmed to file name only that aurumdigitus is after but it would be a step in that direction.
My knowledge of scripting is rudimentary and have built several CTB's but that's it. Your idea is beyond by comprehensin.

Here is the code from one list. How would your suggestion be utilized to show only the file name?

Code: Select all

C:\Documents and Settings\Owner\My Documents\My PDF's\Phone numbers to print.pdf
C:\Documents and Settings\Owner\My Documents\My Scans\2011\LHM\LHM Phone Card.pdf
C:\Documents and Settings\Owner\My Documents\My PDF's\Vista Font sample.pdf
"A step in that direction" would be of superlative value. :D

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

Re: User Buttons as Open-With Panels - File name only

Post by TheQwerty »

aurumdigitus wrote:Here is the code from one list. How would your suggestion be utilized to show only the file name?

Code: Select all

C:\Documents and Settings\Owner\My Documents\My PDF's\Phone numbers to print.pdf
C:\Documents and Settings\Owner\My Documents\My Scans\2011\LHM\LHM Phone Card.pdf
C:\Documents and Settings\Owner\My Documents\My PDF's\Vista Font sample.pdf
"A step in that direction" would be of superlative value. :D
It would take the format:

Code: Select all

"Name|Icon" C:\Path\To\File.ext
So you could display just the base names:

Code: Select all

"Phone numbers to print" C:\Documents and Settings\Owner\My Documents\My PDF's\Phone numbers to print.pdf
"LHM Phone Card" C:\Documents and Settings\Owner\My Documents\My Scans\2011\LHM\LHM Phone Card.pdf
"Vista Font Sample" C:\Documents and Settings\Owner\My Documents\My PDF's\Vista Font sample.pdf
Or use your own custom names:

Code: Select all

"PRINT ME NOW" C:\Documents and Settings\Owner\My Documents\My PDF's\Phone numbers to print.pdf
"Last Year's LHM Phone Card" C:\Documents and Settings\Owner\My Documents\My Scans\2011\LHM\LHM Phone Card.pdf
"Vista? Really?" C:\Documents and Settings\Owner\My Documents\My PDF's\Vista Font sample.pdf
Or add some icons as well:

Code: Select all

"PRINT ME NOW|C:\Path\To\Printer.ico" C:\Documents and Settings\Owner\My Documents\My PDF's\Phone numbers to print.pdf
This would require you to define the display names instead of doing so automatically, but it also means it should be more useful when you have two items with the same file name but different paths.

And that's not to say I'm against XY automatically using the file name, just offering an alternative solution. ;)

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: User Buttons as Open-With Panels - File name only

Post by aurumdigitus »

Your work around is now understood! The drop-down list looks exactly as desired. However, when a document is clicked the following error appears.

Sigh ... Life can be a truculent journey.
To see the attached files, you need to log into the forum.

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

Re: User Buttons as Open-With Panels - File name only

Post by admin »

TheQwerty wrote:Why not detect the normal script caption? Or is that what you're using to differentiate?
Uhm, yes, which is why it will not work.

A tweak to show filenames only would be the easiest solution. But: who else would need this? Who else is using this feature anyway? I never got any feedback on it.

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: User Buttons as Open-With Panels - File name only

Post by aurumdigitus »

Okay, okay - I'll live with the path! The feature's usefulness out weights this minor drawback. :lol:

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

Re: User Buttons as Open-With Panels - File name only

Post by TheQwerty »

aurumdigitus wrote:Your work around is now understood! The drop-down list looks exactly as desired. However, when a document is clicked the following error appears.

Sigh ... Life can be a truculent journey.
:oops: Opps.. I was making the suggestion to Don, to make it work you'd actually have to turn your file into a full script and use OpenWith for each of the paths.

But as he uses the absence of the "Caption" etc. to detect an Auto-OpenWith entry instead of an actual script, that won't work.

-----
I'm not using the feature so I've got no horse in the race, just making suggestions that I'm sure Don's already thought of... :P

There could be crazy new flags that could be appended to the end of the items:
/:p = Show full path.
/:df = Show directory/file name
/:db = Show directory/base name
/:f = Show file name
/:b = Show base name

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

Re: User Buttons as Open-With Panels - File name only

Post by admin »

aurumdigitus wrote:Okay, okay - I'll live with the path! The feature's usefulness out weights this minor drawback. :lol:
Drawback to you. Others might find it useful to see the full paths. I assume most others, otherwise I would not have coded it like this.

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: User Buttons as Open-With Panels - File name only

Post by aurumdigitus »

To TheQwerty: Thank you for the time and effort you put into my quest. Your tutelage and code nuggets have benefited me many times over the years.

As Don's perspective is encompassing his view of the path's issue is probably yielding the greatest good for the most users.

Post Reply