WaitForImage(ByRef pic, ByRef windowRef, ByRef timeout)
{
coordmode, pixel, screen
WinGetPos, winX, winY, winWidth, winHeight, %windowRef%
waitVal = 100
count = 0
maxIter := timeout / waitVal
while count < maxIter
{
IfWinNotActive, %windowRef%
WinActivate, %windowRef%
ImageSearch, imageX, imageY, winX, winY, winX+winWidth, winY+winHeight, %pic%
if not ErrorLevel ; Found !
{
coordmode, pixel, Relative
return true
}
Sleep waitVal
count += 1
}
coordmode, pixel, Relative
return false
}
autohotkey
<iframe width="100%" height="596" src="http://ginkobox.fr/vamp/index.php?embed=54fdd9eca61f7" type="text/html"></iframe>
Text only - Permalink - Snippet public post date 09/03/2015