Jump to content

Save an image to clipboard...


 Share

Recommended Posts

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.

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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