#include <WinAPISys.au3>
#include <ScreenCapture.au3>
Local $fPic = '1.png'
Local $hTimerProc = DllCallbackRegister('_TimerProc', 'none', 'hwnd;uint;uint_ptr;dword')
Local $iTimerID = _WinAPI_SetTimer(0, 0, 100, DllCallbackGetPtr($hTimerProc))
Msgbox(0, '', 'Hello World!')
_WinAPI_KillTimer(0, $iTimerID)
DllCallbackFree($hTimerProc)
Func _TimerProc($hWnd, $iMsg, $iTimerID, $iTime)
Local $hWin = WinGetHandle('', 'Hello World!')
If Not @error Then
_ScreenCapture_CaptureWnd($fPic, $hWin, 0, 0, -1, -1, False)
_WinAPI_KillTimer(0, $iTimerID)
DllCallbackFree($hTimerProc)
EndIf
EndFunc ;==>_TimerProc
|