Sign in to follow this  
Followers 0
Rawox

[SOLVED] Capture active window?

3 posts in this topic

#1 ·  Posted (edited)

Heya!

I want to take a screenshot of the currently active window and save in a user specified folder...

I don't know what to use for the $ActiveWindow Variable.

If GUICtrlRead ( $Mouse ) = $GUI_CHECKED Then
                            $CaptureMouse = True
                        Else
                            $CaptureMouse = False
                        EndIf
                        $Image = _ScreenCapture_CaptureWnd ( "", $ActiveWindow, 0, 0, -1, -1, $CaptureMouse )
                        $fFreeBmp = True
                        _ScreenCapture_SaveImage ( $ReadDir & "\PictuRec " & $i & ".jpg", $Image, $fFreeBmp )

=========================

If I try "[active]" I just get black files (1x1 pixels)....

Anyone?

Edited by Rawox

Share this post


Link to post
Share on other sites



Yeay! That did it, thanks Yashied!

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