Sign in to follow this  
Followers 0
Federico

Save an image to clipboard...

3 posts in this topic

Hi all, i'm looking for a way to save a screen area to the clipboard.

I'd like to get a window area, so tried to use this command:

_ScreenCapture_CaptureWnd ("",$hGUI)

I don't want to save to a file, but i need to get the image using mspaint, in example.

i've tried a lot, but i've not found anything.

Thanks a lot in advice, and sorry for my poor english.

Share this post


Link to post
Share on other sites



Hi all, i'm looking for a way to save a screen area to the clipboard.

I'd like to get a window area, so tried to use this command:

_ScreenCapture_CaptureWnd ("",$hGUI)

I don't want to save to a file, but i need to get the image using mspaint, in example.

i've tried a lot, but i've not found anything.

Thanks a lot in advice, and sorry for my poor english.

From here

http://www.autoitscript.com/forum/index.ph...st&p=514764

is a modified example.

Having run the script, paste contexts of clipboard to a graphics program like MSPaint.

#include <ClipBoard.au3>
#include <ScreenCapture.au3>

$GUI = GUICreate("GUI clipimage")
$hBitmap = _ScreenCapture_Capture("", 100, 100, 796, 596) ; Enter screen coordinates here
_ClipBoard_Open($GUI)
_ClipBoard_Empty()
_ClipBoard_SetDataEx($hBitmap, $CF_BITMAP)
_ClipBoard_Close()
If Not _ClipBoard_IsFormatAvailable($CF_BITMAP) Then
    MsgBox(0, "", "There was an error while pasting the bitmap to the clipboard!")
EndIf

Share this post


Link to post
Share on other sites

Thanks, it helped me !


Share this post


Link to post
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
Sign in to follow this  
Followers 0