Page 1 of 1
Lister: use selection as a URL
Posted: 2017-11-16, 09:46 UTC
by browny
There is already a nice option to search for a selected text in Google.
A natural addition would be to go directly to the address in selection.
The selection does not need to be parsed for
http:// and the like, because quite often URL might be given as
www.site.com or even
site.org, but a browser still could open that page.
Posted: 2017-11-17, 05:02 UTC
by Gral
Already possible.
Just add similar text to your main INI file under [Lister] section.
Code: Select all
Contextmenu1=Open in default browser|http://%s
You can also define many browsers, e.g.
Code: Select all
ContextMenu2=Open in Opera|"C:\Program Files\Opera\Opera.exe" %s
ContextMenu3=Open in Firefox|"C:\Program Files\Mozilla Firefox\firefox.exe" %s
ContextMenu4=Open in Internet Explorer|"C:\Program Files\Internet Explorer\IEXPLORE.EXE" %s
Posted: 2017-11-17, 13:08 UTC
by browny
Code: Select all
Contextmenu2=Open in default browser|%s
This line did precisely what was requested.
Thanks,
Gral.
Re: Lister: use selection as an URL
Posted: 2024-10-11, 11:39 UTC
by browny
21.08.24 Added: Lister: Right click on URL starting with http://, https://, www. or alphanumeric text with at least one dot before the end selects it and shows context menu item 'Open in default browser' (32/64)
Thanks.
This implementationI could be enhanced, so that the menu item 'Open in default browser' would also be present for a selection: use selection if there is no link at the cursor, or the cursor is at the selection (a link or a part of the link was selected explicitly).
Selected text should not be parsed - this would help if text was not recognized as a URL.
An additional possibility, seletion could be a file path/name to be opened in a browser.
The most common operation with selections is 'Copy', so ''Open in default browser' item should be always at the bottom to prevent the item from jumping around the menu.
Re: Lister: use selection as a URL
Posted: 2024-10-13, 07:37 UTC
by ghisler(Author)
This implementationI could be enhanced, so that the menu item 'Open in default browser' would also be present for a selection
It already is when you select an URL manually.
Selected text should not be parsed
Why not? You would only get an error otherwise.
this would help if text was not recognized as a URL
Please report any such cases.
Re: Lister: use selection as a URL
Posted: 2024-10-13, 09:48 UTC
by browny
ghisler(Author) wrote: 2024-10-13, 07:37 UTC
This implementationI could be enhanced, so that the menu item 'Open in default browser' would also be present for a selection
It already is when you select an URL manually.
It is not if selection was not "a URL" by your definition.
Besides, there are other URL schemes, not only hypertext.
ghisler(Author) wrote: 2024-10-13, 07:37 UTC
Selected text should not be parsed
Why not? You would only get an error otherwise.
No big deal.
For example, a program needs a file name in command line, but got a directory path - simply correct your actions and choose a file.
Same here, user should think at least when selecting text.
ghisler(Author) wrote: 2024-10-13, 07:37 UTC
this would help if text was not recognized as a URL
Please report any such cases.
As said above, file names can be without dots and usually cannot contain URL schemes.
Also examples would be:
localhost for local site, of a line "thisserver 10.0.0.10" in
hosts file, or DNS suffix in network configuration.
It all boils down to the initial feature request - use selection, otherwise trying to parse text for a link would be a nice addition.
Re: Lister: use selection as a URL
Posted: 2024-10-14, 15:22 UTC
by ghisler(Author)
You could define your own custom menu item, e.g.
Contextmenu2=Open in Chrome|"chrome.exe" %s
Re: Lister: use selection as a URL
Posted: 2024-10-14, 16:33 UTC
by browny
ghisler(Author) wrote: 2024-10-14, 15:22 UTC
You could define your own custom menu item
So I did 7 years ago - following
Gral's advice; and still keep it for 11.50.
Re: Lister: use selection as a URL
Posted: 2024-11-06, 14:38 UTC
by browny
TC does not validate URL syntax or link destination, so user's decisions may take precedence over automatic ones.
Otherwise, the action would still be done with slightly more efforts, be it a custom menu or mere copy & paste.