Negative1 Posted June 8, 2010 Share Posted June 8, 2010 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 More sharing options...
PsaltyDS Posted June 9, 2010 Share Posted June 9, 2010 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() 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now