Remo1075 Posted January 3, 2010 Share Posted January 3, 2010 (edited) I can't get my script to paste to the body of an e-mail (outlook) or to mspaint. Other applications like Word and Powerpoint seem to accept the contents of the clipboard just fine. I am currently using bmp format to maybe make things a bit easier but would chnage it to png in the end for e-mail and compression reasons. $sBMP_Path = @DesktopDir & "\ScreenCapture.bmp" _ScreenCapture_Capture($sBMP_Path, $iX1, $iY1, $iX2, $iY2, False) _ClipBoard_Open(0) _ClipBoard_SetData($sBMP_Path,$CF_BITMAP) _ClipPutFile($sBMP_Path) _ClipBoard_Close() ;This also seems to work just as well, meaning it still won't paste to mspaint or to the body of an e-mail in Outlook. ( adds it as an attachment) $sBMP_Path = @DesktopDir & "\ScreenCapture.bmp" _ScreenCapture_Capture($sBMP_Path, $iX1, $iY1, $iX2, $iY2, False) _ClipPutFile($sBMP_Path) Thanks for any insight Edited January 3, 2010 by Remo10 Link to comment Share on other sites More sharing options...
bogQ Posted January 3, 2010 Share Posted January 3, 2010 (edited) you can use forum search "clipboard paint" and something interesting will happen For your paint #Include <Clipboard.au3> #Include <ScreenCapture.au3> $a = _ScreenCapture_Capture() _ClipBoard_Open("") _ClipBoard_Empty() _ClipBoard_SetDataEx($a, $CF_BITMAP) _ClipBoard_Close() Edited January 3, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Remo1075 Posted January 3, 2010 Author Share Posted January 3, 2010 you can use forum search "clipboard paint" and something interesting will happen For your paint #Include <Clipboard.au3> #Include <ScreenCapture.au3> $a = _ScreenCapture_Capture() _ClipBoard_Open("") _ClipBoard_Empty() _ClipBoard_SetDataEx($a, $CF_BITMAP) _ClipBoard_Close() As soon as I add co-ordinates to the _screencapture_capture() office clipboard does not capture it which is my whole point to use x y #Include <Clipboard.au3> #Include <ScreenCapture.au3> $a = _ScreenCapture_Capture("c:\out.bmp", 0, 0, 796, 596) _ClipBoard_Open("") _ClipBoard_Empty() _ClipBoard_SetDataEx($a, $CF_BITMAP) _ClipBoard_Close() This results in the following attached error from mspaint. Link to comment Share on other sites More sharing options...
bogQ Posted January 3, 2010 Share Posted January 3, 2010 (edited) $a = _ScreenCapture_Capture("", 0, 0, 796, 596)"" is important part to work Edit: from help fileIf FileName is not blank this function will capture the screen and save it to file. If FileName is blank, thisfunction will capture the screen and return a HBITMAP handle to the bitmap image. Edited January 3, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Remo1075 Posted January 3, 2010 Author Share Posted January 3, 2010 OK, thanks alot, that did it. I actually read that bit but was concentrating too much on trying to output a hard copy of the file as well. Once again thanks for your help. 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