1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| #include "FastFind.au3"
#RequireAdmin
Global $handle = InputBox("","Nom de la fenêtre")
FFSetWnd($handle)
WinWait($handle) ;Attend la fenêtre
WinActivate($handle) ;Active la fenêtre
WinMove($handle, "", 0, 0, 784, 652) ;Redimentionnement et repositionnement de la fenêtre
WaitPixel(75, 96, 0x000000)
WaitNotPixel(75, 96, 0x000000)
DetecteChgmt()
MsgBox(0,"","Test")
WaitPixel(75, 96, 0x000000)
WaitNotPixel(75, 96, 0x000000)
DetecteChgmt()
MsgBox(0,"","Test")
Func DetecteChgmt()
Local $localise = False
FFSnapShot(0, 0, @DesktopWidth, @DesktopHeight, 0)
Do
Sleep(1000)
FFSnapShot(0, 0, @DesktopWidth, @DesktopHeight, 1)
FFSetDebugMode(2)
$localise = FFIsDifferent(0, 1)
Until $localise = True
EndFunc
Func WaitPixel($x, $y, $color)
Local $pxl = 0
Do
$pxl = PixelGetColor($x, $y)
Until $pxl = $color
EndFunc
Func WaitNotPixel($x, $y, $color)
Local $pxl = 0
Do
$pxl = PixelGetColor($x, $y)
Until $pxl <> $color
EndFunc |
Partager