Delta01 Posted December 15, 2007 Share Posted December 15, 2007 Hi, I'm making a simple screenshot script, with a few options etc etc. But, I'm having a problem with taking and saving an image of a window. All it does saves a 1x1 pixel image, doesn't save a screenshot of the window. My code is #include <ScreenCapture.au3> WinActivate("AutoIt Help") sleep(500) $SsTake = _ScreenCapture_CaptureWnd("", "AutoIt Help", -1, -1, -1, -1) _ScreenCapture_SaveImage(@ScriptDir & "\Test.jpg", $SsTake) I have the latest beta. Any help would be appreciated, thanks. Link to comment Share on other sites More sharing options...
Delta01 Posted December 15, 2007 Author Share Posted December 15, 2007 I've tried everything I can think of. Anybody else getting this / know what to do? Link to comment Share on other sites More sharing options...
Delta01 Posted December 16, 2007 Author Share Posted December 16, 2007 Bump. Please help Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 You need to read up on what an handle to the window is.... #include <ScreenCapture.au3> WinActivate("AutoIt Help") $hWnd = WinGetHandle("AutoIt Help") Sleep(500) $SsTake = _ScreenCapture_CaptureWnd("", $hWnd) _ScreenCapture_SaveImage(@ScriptDir & "\Test.jpg", $SsTake) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Delta01 Posted December 16, 2007 Author Share Posted December 16, 2007 You need to read up on what an handle to the window is.... #include <ScreenCapture.au3> WinActivate("AutoIt Help") $hWnd = WinGetHandle("AutoIt Help") Sleep(500) $SsTake = _ScreenCapture_CaptureWnd("", $hWnd) _ScreenCapture_SaveImage(@ScriptDir & "\Test.jpg", $SsTake) Ohhh. I see lol. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now