Sign in to follow this  
Followers 0
supersonic

Take window snapshots when is in background or minimized

3 posts in this topic

#1 ·  Posted (edited)

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



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

#3 ·  Posted (edited)

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  
Followers 0