Jump to content

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.

Thanks,

-1

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

Link to comment
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>

_ClipBoard_Open(0)
$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)
    Else
        ExitLoop
    EndIf
WEnd

_ClipBoard_Close()

:mellow:

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
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
 Share

  • Recently Browsing   0 members

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