Jump to content
Sign in to follow this  
gte

Screencapture_CaptureWnd not working as expected

Recommended Posts

gte

It saves it as a 1kb blank file, as if it was capturing just a white page, and the 1kb blank file won't open?

Not sure what I'm doing wrong here? It does however work in the example in the help file, with the guicreate function? :D

#Include <ScreenCapture.au3>
#Include <IE.au3>

$todaysdate = "" & @mon & "-" & @mday & "-" & @YEAR

$ietext =_IECreate("http://www.google.com")

_IELoadWait($ietext)

_ScreenCapture_CaptureWnd("c:\temp\saved_" & $todaysdate & ".jpg", "Google - Windows Internet Explorer")

Share this post


Link to post
Share on other sites
gte

***Tail between legs***

Figured it out myself, sorry I wasted some bandwidth here ... where do I make donations :D

I needed a handle, and not window title, the correct text in case this comes up in a search is

#Include <ScreenCapture.au3>
#Include <IE.au3>

$todaysdate = "" & @mon & "-" & @mday & "-" & @YEAR

$ietext =_IECreate("http://www.google.com")

_IELoadWait($ietext)

$whandle = WinGetHandle("Google - Windows Internet Explorer")

ConsoleWrite("Handle = " & $whandle & @CRLF)

_ScreenCapture_CaptureWnd("c:\temp\saved_" & $todaysdate & ".jpg", $whandle)

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.