Extracting data from the Clipboard

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
cjohnsonuk
Posts: 7
Joined: 09 Sep 2022, 03:12

Extracting data from the Clipboard

28 Feb 2023, 04:30

I would like to copy an HTML link from a web page
and paste it as markup

so for example
text on a web page displayed as "Documentation"

with a link to https://copyq.readthedocs.io/

could be pasted as

Code: Select all

[[https://copyq.readthedocs.io/|Documentation ]]
At the moment when I copy a link from an HTML page I can paste into a word processor and get a working link but when I paste into a web form I get just the text. I then have to go back and "Copy link" from the html page and paste in the URL.

When I copy the link and use a clipboard viewer to "Show Content" I can see that the text/plain part of the clipboard contains 'Documentation', the text/html part contains the styled link as html but I can't see how to access these parts programmatically using Autohotkey to allow me to paste the components in the required mark up format.

At the moment I have to copy text, paste it, then copy link and paste that . It would be good to get both in one go.

How do i :
  • check that the clipboard contains a link
  • access the different parts of the clipboard to extract the URL and link text

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: No registered users and 34 guests