Page 1 of 1

User Buttons as Open-With Panels - File name only

Posted: 08 Jan 2012 13:48
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?

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

Posted: 08 Jan 2012 17:29
by Stefan
Can you show your button code?

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

Posted: 09 Jan 2012 11:54
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.

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

Posted: 09 Jan 2012 13:00
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}?

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

Posted: 09 Jan 2012 13:11
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.

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

Posted: 09 Jan 2012 13:35
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

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

Posted: 09 Jan 2012 14:01
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. ;)

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

Posted: 09 Jan 2012 15:26
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.

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

Posted: 09 Jan 2012 15:41
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.

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

Posted: 09 Jan 2012 15:56
by aurumdigitus
Okay, okay - I'll live with the path! The feature's usefulness out weights this minor drawback. :lol:

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

Posted: 09 Jan 2012 16:02
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

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

Posted: 09 Jan 2012 16:02
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.

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

Posted: 09 Jan 2012 16:52
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.