Hi all,
What is the fastest way to paste a URL from clipboard as an URL file?
I want the same result as if I navigated to that URL in a browser and then dragged the URL from the browser's address bar (from its padlock icon) into XY.
But I don't want to have to open the URL in the browser first.
Is there a working solution for that in XY already available?
regards, me.
Fastest way to paste a URL from clipboard as a URL file?
-
autocart
- Posts: 1378
- Joined: 26 Sep 2013 15:22
Fastest way to paste a URL from clipboard as a URL file?
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Fastest way to paste a URL from clipboard as a URL file?
The usual scripting?
Code: Select all
$content = readurlutf8(<clp>);
if ($content) {
$head = regexmatches($content, "<[ ]*?head[ ]*?>(\s|\S)*?<[ ]*?/head[ ]*?>");
$title = regexmatches($head, "<[ ]*?title[ ]*?>.*?<[ ]*?/title[ ]*?>");
$title = trim(regexreplace($title, "<[ ]*?/?title[ ]*?>"));
if ($title == "") { $title = "Current URL"; }
writefile($title . ".url", "[InternetShortcut]<crlf>URL=<clp>", , "utf8");
}
One of my scripts helped you out? Please donate via Paypal
-
autocart
- Posts: 1378
- Joined: 26 Sep 2013 15:22
Re: Fastest way to paste a URL from clipboard as a URL file?
Ok, that i a helpful start, thank you very much!
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
XYplorer Beta Club