Page 1 of 1

Comments (or similar) as hyperlinks?

Posted: 16 Oct 2014 12:43
by sclg
Is it possible to add a column that is a hyperlink to somewhere?
I know I can effectively paste a link into a 'Comment' but I'd need to cut and paste it to a browser to use it rather than just clicking it.

Reason is that I have a need to list the files in a folder and also store a web link to a set of instructions about that file.
It would be really useful to have that link as one of the columns in the file list!

Thanks

Re: Comments (or similar) as hyperlinks?

Posted: 16 Oct 2014 13:08
by highend
Yeah, possible.

E.g. you could use a tag and a custom column with a script, e.g.:

tag a file with:

Code: Select all

url:http://www.xyplorer.com
Don't leave "url:" out^^

Next, configure a custom column:
Caption: Maybe "URL"
Type: Script
Script:

Code: Select all

 $url = regexreplace(property("#tags", "<cc_name>"), "(.*?url:)([^,]+)(.*)", "$2");
 if ($url) { run "$url"; }
Format: Text
Trigger: Click
Item type: Files

Now add that custom column to your current view.

Clicking on the play icon for files that have a url:<url> tag will open this link in the default browser...

Re: Comments (or similar) as hyperlinks?

Posted: 16 Oct 2014 13:36
by bdeshi
Plus if you don't need the url column everywhere, read up on Folder View Settings in the help file.

Re: Comments (or similar) as hyperlinks?

Posted: 16 Oct 2014 16:28
by sclg
Many thanks - I'll give that a try.

Re: Comments (or similar) as hyperlinks?

Posted: 21 Oct 2014 14:43
by TheQwerty
highend wrote:E.g. you could use a tag and a custom column with a script, e.g.:
You could also use one of the Extra Tag columns with type Location. Then you can tag the item with locations to go to/display in a menu when that column is clicked.

Though in this case you'd want to use just 'http://www.xyplorer.com' and not include the 'url:' prefix.

Re: Comments (or similar) as hyperlinks?

Posted: 21 Oct 2014 18:51
by highend
Much better than my method, TheQwerty!

No play button in the column and the url is actually shown (instead of hidden) :)

Re: Comments (or similar) as hyperlinks?

Posted: 21 Oct 2014 20:29
by sclg
Thanks - having alternatives is always good!
Steve

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 17:45
by JLoftus
Taking this idea a step further, I use a great freeware app called "Linker for Windows" (http://teamscope.com/otherpro/linker.asp) which allows for the creation of hyperlinks to specific Outlook items. Every individual Outlook item has an underlying GUID. When this specially crafted URL is called, the Outlook item is opened (email, calendar item, contact, task, etc). The hyperlink that's created references an HKCR entry "Outlook" to call Outlook.exe with the parameter, and uses the format:

outlook:nnn (where nnn is the obnoxiously long GUID).

Pasting a hyperlink created by Linker for Windows into for example a Word document or a OneNote item, allows "linking" to the backing Outlook item. It's SUPER handy!

I have been playing with both of the ideas mentioned above, and neither is working to invoke this hyperlink. Using the Extra column method, XY opens a new tab with (naturally) the error that the location cannot be found. Using the script method with the custom column results in a "File not found" error in the custom column (yes, I did prepend the content with "url:", which itself was an extra manual step but one I could live with if the action worked).

Anyone who uses Outlook and has a few minutes to spare that could grab the TeamScope app (needs an email address to download it), I promise you will love the functionality... getting this working with XY would be nothing short of awesome.

Thanks!

Jeff

Edit: P.S. The download page says it's a 30 day trial but Linker is one of their exceptions, it's freeware

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 18:10
by admin
These are LNK or URL files?

What happens if you right-click such a file and choose "open" from the context menu?

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 18:11
by TheQwerty
I suspect it's just installing registering a custom URL protocol & handler.

In XY's address try running this with one of those links:

Code: Select all

::open 'outlook:nnn';
If it opens correctly in Outlook then you can just use that script as the location. Though that makes the extra column data look rather ugly so you might want to prefix it with a caption:

Code: Select all

"Outlook" ::open 'outlook:nnn';

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 18:15
by JLoftus
admin wrote:These are LNK or URL files?

What happens if you right-click such a file and choose "open" from the context menu?
These are any file types (pdf, doc, etc) which I would like to add a tag (or any other column) which contains the link created by Linker for Windows, and then have the ability to invoke that link by clicking that column for the selected item

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 18:16
by JLoftus
TheQwerty wrote:I suspect it's just installing registering a custom URL protocol & handler.

In XY's address try running this with one of those links:

Code: Select all

::open 'outlook:nnn';
If it opens correctly in Outlook then you can just use that script as the location. Though that makes the extra column data look rather ugly so you might want to prefix it with a caption:

Code: Select all

"Outlook" ::open 'outlook:nnn';

Running ::open <link value> works!!!

Thank you TheQuerty!

edit: Got it! So, using the Extra1 column and making it the string TheQuerty used ("Outlook" ::open outlook:nnnn) works!

Thank you, thank you, thank you!

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 18:30
by TheQwerty
You should be able to also take an approach similar to highend's suggestion by tagging the files with the link:

Code: Select all

outlook:nnn
But then use a script like:

Code: Select all

 $url = regexreplace(property("#tags", "<cc_name>"), "(.*?)(outlook:[^,]+)(.*)", "$2");
 if ($url) { open "$url"; }
(Note though that I haven't tested this to verify.)

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 18:49
by JLoftus
Yes, this works too!

I'm playing with both now, as each requires some manual manipulation of the hyperlink produced by Linker for Windows - it cannot simply be pasted to the tag, custom, or extra column as-is.

With the Extra column, I have to paste as text and then cleanup the html markup, as well as prepend a nice title.
With the Custom column method, I still have to remove the html markup and then that leaves the column "ugly" as noted earlier.

Thank you again for your ideas!

Re: Comments (or similar) as hyperlinks?

Posted: 08 Apr 2015 20:21
by JLoftus
So I've managed to make this a bit easier by creating an AutoHotKey snippet to "fix up" the HTML text link created by Linker for Windows. (for this purpose, I have the "text" option selected in the Linker for Windows tray icon)

;--------------------------------------------------------------
StringTrimLeft, clipboard, clipboard, 12
tmp = "Outlook Item" ::open %clipboard%
clipboard := SubStr(tmp, 1, InStr(tmp, "'>", 0, 0) -1)
SendInput {Raw}%clipboard%
;--------------------------------------------------------------

This results in the ability to paste into the Custom Column data edit box, the properly formatted string needed for XY to launch the hyperlink.

Works a treat!

Thanks again to TheQuerty for the assistance coming up with the needed XY script syntax to launch the Linker for Windows hyperlink.