bobbyab9987 0 Posted December 18, 2013 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. Share this post Link to post Share on other sites
l3ill 70 Posted December 18, 2013 My Contributions...SnippetBrowserNewSciTEPathFinderText File ManipulationFTP Connection Tester / INI File - Read, Write, Save & Load Example Share this post Link to post Share on other sites
karlkar 2 Posted December 18, 2013 ClipPut is much more simple Share this post Link to post Share on other sites
bobbyab9987 0 Posted December 18, 2013 Clipboard01.jpg Hi I3ill, thanks for your answer but from the AutoIt help file we can see that this function does not support the HTML format. ClipPut is much more simple Hi karlkar, thanks for your answer but from the AutoIt help file we can see that this function only puts text into the clipboard without any format option. Share this post Link to post Share on other sites
karlkar 2 Posted December 18, 2013 When you have your text in clipboard, then you can do something like this: $txt = "<html><title>" & ClipGet() & "</title></html>" ClipPut($txt) Is that what you want or I misunderstood? Share this post Link to post Share on other sites
bobbyab9987 0 Posted December 19, 2013 When you have your text in clipboard, then you can do something like this: $txt = "<html><title>" & ClipGet() & "</title></html>" ClipPut($txt) Is that what you want or I misunderstood? Hi Karlkar, thanks for your answer. I already found the solution to my problem at this article. Share this post Link to post Share on other sites
iCode 8 Posted December 19, 2013 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) Share this post Link to post Share on other sites