Sala Posted June 26, 2016 Share Posted June 26, 2016 Hi community, I used a script which made me save my copied pictures from clipboard to a file on my hard drive. Today it stopped working? Can someone help me? So there is a image.jpg file in my clipboard, I double checked, the folder is also correct and exists and no administrator rights are needed. Still the image is not getting saved into the folder. #include <AutoItConstants.au3> #include <Misc.au3> #include <Constants.au3> #include <ClipBoard.au3> #include <GDIPlus.au3> $lol = @ScriptDir & "\PICTURES\" & TimerInit() & "_Clipboard_Image.jpg" 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") ClipPut($lol) _GDIPlus_ImageSaveToFileEx($hBitmap, $lol, $sCLSID, 0) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() sleep(750) Link to comment Share on other sites More sharing options...
UEZ Posted June 27, 2016 Share Posted June 27, 2016 Try _ClipBoard_Open(0) instead. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ 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