I am trying to take a screenshot of a window that is not in the foreground.
I read the help file and I searched the forum. But somehow I just can't get it to work...
I tried multiple versions. Noone work. They simply capture my current screen OR capture a small black rectangle.
#include <ScreenCapture.au3>
Main()
Func Main()
Local $handle
$handle = WinGetHandle("Untitled - Notepad");
; Capture window
_ScreenCapture_CaptureWnd(@MyDocumentsDir & "\test.jpg", $handle);
ShellExecute(@MyDocumentsDir & "\test.jpg")
EndFunc
#include <ScreenCapture.au3>
Main()
Func Main()
Local $handle
$handle = 0x00AC05BA
; Capture window
_ScreenCapture_CaptureWnd(@MyDocumentsDir & "\test.jpg", $handle);
ShellExecute(@MyDocumentsDir & "\test.jpg")
EndFunc
Any Ideas why this is not working? I am trying to build a browser based streaming service. So it would be great if I could capture windows that are not in the front.