Jump to content

Clipboard


Recommended Posts

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

post-49149-12625254387093_thumb.jpg

Edited by Remo10
Link to comment
Share on other sites

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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.

post-49149-12625292472083_thumb.jpg

Link to comment
Share on other sites

$a = _ScreenCapture_Capture("", 0, 0, 796, 596)

"" is important part to work ;)

Edit: from help file

If FileName is not blank this function will capture the screen and save it to file. If FileName is blank, this

function will capture the screen and return a HBITMAP handle to the bitmap image.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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