Sign in to follow this  
Followers 0
leuce

How to get access to mixed clipboard content

4 posts in this topic

#1 ·  Posted (edited)

Hello everyone

I'm copying text from a web site that includes inline images, and I need to be able to access the full clipboard (not just the unformatted text).

The program InsideClipboard displays a version of the clipboard that it calls "HTML format", which is what I need. One can also save a CLP file using InsideClipboard, and the CLP file (when opened in a text editor) contains the HTML version of the clipboard (along with other binary data).

The AutoHotKey command

FileAppend, %ClipboardAll%, foo.clip
creates the same file as InsideClipboard.

I tried using _ClipBoard_GetData in AutoIt, but none of the data formats that one can specify with it yields the HTML version of the clipboard.

Do you know of a function in AutoIt that produces the same result as

FileAppend, %ClipboardAll%, foo.clip
in AutoHotKey?

Thanks

Samuel

PS. The file created by AHK is attached.

foo.zip

Edited by leuce

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Heres a link to a UDF for getting html from the clipboard link

Also, You can use this function to see what the types of formats your clipboard has:

_Clipboard_EnumFormats

:)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Heres a link to a UDF for getting html from the clipboard...

Thanks, this worked. I had to convert the data to Unicode, however, using:

$foo = _ClipGetHTML ()
$sUnicodeHTML=BinaryToString($foo[0],4)
$bar = $sUnicodeHTML

Share this post


Link to post
Share on other sites

Thanks, this worked. I had to convert the data to Unicode, however, using:

 

$foo = _ClipGetHTML ()
$sUnicodeHTML=BinaryToString($foo[0],4)
$bar = $sUnicodeHTML

Anytime ;) Glad you figured it out.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0