Hello, I'm trying to save an Image to a file from the clipboard. This might sound a little odd but the only way to get the image is by copying it to the clipboard and then i want autoit to save it to a JPG file. Is there any way to achieve this? In the helpfile the only feature which comes close to what i want is "_ClipPut" but thats only to put files from the harddisk to the clipboard. I want it the other way around, so i save a file to the HDD from the clipboard. Any suggestions? Would be
Interesting question ....
#include <ClipBoard.au3>
#include <GDIPlus.au3>
If Not _ClipBoard_Open(WinGetHandle(AutoItWinGetTitle())) Then MsgBox(0, "", "_ClipBoard_Open failed")
$hClipboardImage = _ClipBoard_GetDataEx($CF_BITMAP)
_ClipBoard_Close()
_GDIPlus_Startup()
$hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hClipboardImage)
$sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
_GDIPlus_ImageSaveToFileEx($hBitmap, @ScriptDir & "\" & TimerInit() & "_Clipboard_Image.jpg", $sCL