Jump to content
Sign in to follow this  
supersonic

Take window snapshots when is in background or minimized

Recommended Posts

supersonic

Hi!

Is there a way to take snapshots of a window when it is in background or minimized?

This sample code works, but only when a window is visible:

#include <ScreenCapture.au3>
#include <WinAPI.au3>

Global $hWnd = WinGetHandle("[CLASS:Notepad]", "")
Global $aTmp = WinGetPos($hWnd, "")

If IsArray($aTmp) = 1 Then
    _ScreenCapture_SetJPGQuality(100)
    _ScreenCapture_CaptureWnd(@ScriptDir & "\test.jpg", $hWnd, $aTmp[0], $aTmp[1], $aTmp[2], $aTmp[3], False)
EndIf

Anyone any ideas?

Greets,

-supersonic.

Edited by supersonic

Share this post


Link to post
Share on other sites
picea892

hi

Yes, much asked question. My understanding is you can take a screenshot when a window is hidden using guisetstate, but can not be taken if a window is minimized. Moved off the screen, yes but via a different method

Share this post


Link to post
Share on other sites
supersonic

Thank you! :) It works perfect!

I'm sorry for asking this question again. :(

Edited by supersonic

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.