Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ScreenCapture.au3>
- HotKeySet("+!d", "_screenCap") ; Shift-Alt-d
- HotKeySet("{ESC}", "Terminate")
- While 1
- Sleep(1000)
- WEnd
- Func _screenCap()
- Local $hWnd = WinGetHandle("[ACTIVE]")
- _ScreenCapture_CaptureWnd(@ScriptDir & "\activeWin.jpg", $hWnd) ;screenshot of active window
- _ScreenCapture_CaptureWnd(@ScriptDir & "\activeWinPart.jpg", $hWnd, 0, 0, 50, 50, True) ;screenshot 50pxX50px top left active window
- _WinAPI_DeleteObject($hWnd)
- EndFunc ;==>_screenCap
- Func Terminate()
- Exit
- EndFunc ;==>Terminate
Advertisement
Add Comment
Please, Sign In to add comment