Engineer Posted August 12, 2011 Posted August 12, 2011 Well, I'm trying to find a way to screen shot an active window, then pasting it on a paint document. I have no clue about this and any advice would be apricated.
Bert Posted August 13, 2011 Posted August 13, 2011 simple. Holding down the CTRL key and pressing the print screen key will send to the clipboard the entire screen. To just get the active window hold down the ALT key and press printscreen to send the active window to the clipboard. The Vollatran project My blog: http://www.vollysinterestingshit.com/
smashly Posted August 13, 2011 Posted August 13, 2011 Hi, Tried this in win xp, adapt it to suite your needs. It opens MS Paint, captures the MS Paint window and pastes the capture into the same MS Paint window.;code by UEZ, adapted by smashly. #include <Clipboard.au3> #include <ScreenCapture.au3> Run("mspaint.exe") WinWait("[CLASS:MSPaintApp]", "", 5) WinActivate("[CLASS:MSPaintApp]") $err = False $hHBITMAP = _ScreenCapture_CaptureWnd("", WinGetHandle("")) If Not _ClipBoard_Open(0) Then $err = @error $err_txt = "_ClipBoard_Open failed!" EndIf If Not _ClipBoard_Empty() Then $err = @error $err_txt = "_ClipBoard_Empty failed!" EndIf If Not _ClipBoard_SetDataEx($hHBITMAP, $CF_BITMAP) Then $err = @error $err_txt = "_ClipBoard_SetDataEx failed!" EndIf _ClipBoard_Close() _WinAPI_DeleteObject($hHBITMAP) If Not $err Then Send("^v") Else MsgBox(0, "Error", "An error has occured: " & $err_txt, 10) EndIf Cheers
Engineer Posted August 16, 2011 Author Posted August 16, 2011 (edited) Thank you Smashly. This was exactly what I was looking for. Edited August 16, 2011 by Engineer
JohnOne Posted August 16, 2011 Posted August 16, 2011 Here's another way $hWnd = WinActivate("MyWindow") $sFileName = "MyFilename" _ScreenCapture_CaptureWnd($sFileName, $hWnd) Run("mspaint.exe " & $sFileName) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Malkey Posted August 16, 2011 Posted August 16, 2011 Here is a simplified version of smashly's post #3 using MPH's information from post #2. Send("^{PRINTSCREEN}") ; Capture screen ;Send("!{PRINTSCREEN}") ; Capture current window Run("mspaint.exe") WinWait("[CLASS:MSPaintApp]", "", 5) WinActivate("[CLASS:MSPaintApp]") Send("^v")
UEZ Posted August 16, 2011 Posted August 16, 2011 To capture a region have a look to this: Br, UEZ 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
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