Jump to content
Sign in to follow this  
Rawox

[SOLVED] Capture active window?

Recommended Posts

Rawox

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
Yashied
Rawox

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.