Aktonius Posted December 8, 2011 Posted December 8, 2011 i keep getting everything else(borders, titlebar...) Still, i tried to use coords to only grab client area... #include <ScreenCapture.au3> $hGUI = WinGetHandle("Window Title", "") $pos = wingetpos($hGUI) $posclient = WinGetClientSize($hGUI) $bordersize = $pos[2] - $posclient[0] $titlesize = $pos[3] - $posclient[1] WinActivate($hGUI) ; Capture window _ScreenCapture_CaptureWnd(@MyDocumentsDir & "\GDIPlus_Image.jpg", $hGUI, $bordersize,$titlesize,$bordersize,$bordersize) But i am getting blank thing...
Aktonius Posted December 8, 2011 Author Posted December 8, 2011 Ok, after few more tries i think i v figured this out, if anyone is looking for solution here it is... #include <ScreenCapture.au3> $hGUI = WinGetHandle("Title Of Window", "") $tRect = _WinAPI_GetClientRect($hGUI) Local $ltpoint = DllStructCreate("int Left;int Top") DllStructSetData($ltpoint, "Left", 0) DllStructSetData($ltpoint, "Top", 0) _WinAPI_ClientToScreen($hGUI, $ltpoint) Local $rbpoint = DllStructCreate("int Right;int Bottom") DllStructSetData($rbpoint, "Right", DllStructGetData($tRect, "Right")) DllStructSetData($rbpoint, "Bottom", DllStructGetData($tRect, "Bottom")) _WinAPI_ClientToScreen($hGUI, $rbpoint) WinActivate($hGUI) ; Capture window _ScreenCapture_Capture(@ScriptDir&"image1.jpg", DllStructGetData($ltpoint, "Left"), DllStructGetData($ltpoint, "Top"), DllStructGetData($rbpoint, "Right"), DllStructGetData($rbpoint, "Bottom"), False)
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