Jump to content
Sign in to follow this  

Clipget & Clipput with graphics?

Recommended Posts


Hi all,

Trying to take the data currently held in windows clipboard with its current format. The data will be mostly text of various font type, but it also contains a small graphic.

I want to paste into outlook exactly what I have copied. I have achieved this by sending control c and control v but I would like to know if it is possible to retrieve the data from clipboard, save it as a variable, and then output it later.

Note: I understand how to capture it as a string or an image this is not what I am trying to achieve.



What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Share this post

Link to post
Share on other sites

Clipboard contents are a collection of data in various formats that you can't just save to a variable like a string. Try running this several times after copying various types of data and you'll get a clue:

#include <Clipboard.au3>

$iCnt = _ClipBoard_CountFormats()
ConsoleWrite("$iCnt = " & $iCnt & @LF)

$iFormat = 0
While 1
    $iFormat = _ClipBoard_EnumFormats($iFormat)
    If $iFormat Then
        $sName = _ClipBoard_GetFormatName($iFormat)
        ConsoleWrite($iFormat & ":  $sName = " & $sName & @LF)



Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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