Jump to content

Convert a hyperlink from plain text format into HTML format

Recommended Posts

Hi everyone,

I would like to build an AutoIt script allowing me to convert a hyperlink from the plain text format into the HTML format.

Right now I have to use a 2-step workaround like this:

- Copy the hyperlink to clipboard (I just send Ctrl+C to capture the hyperlink in plain text format)
- Call a C# program to get the hyperlink from clipboard, convert it into the HTML format, and put it back to clipboard
       - Inside the C# program I manually add some HTML segments like <!--StartFragment-->, <html><body><p>, ...
       - After adding these segments I use function Clipboard.SetData(DataFormats.Html, myHTMLText) to convert myHTMLText from plain text to HTML text and put it back to clipboard.

This method works, but it is not beautiful. I would like to do the whole thing in AutoIt. Is there any function in AutoIt which can give the same result as the above C# function Clipboard.SetData()?

Thank you.

Link to comment
Share on other sites

In the event you might be looking for a RegEx also, i am also working on >text to html stuff

FUNCTIONS: WinDock (dock window to screen edge) | EditCtrl_ToggleLineWrap (line/word wrap for AU3 edit control) | SendEX (yet another alternative to Send( ) ) | Spell Checker (Hunspell wrapper) | SentenceCase (capitalize first letter of sentences)

CODE SNIPPITS: Dynamic tab width (set tab control width according to window width)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...