Skip to content

Instantly share code, notes, and snippets.

@jasp402
Created February 12, 2018 14:20
Show Gist options
  • Save jasp402/0a75a2ce390f2f9c31d51dc368780c17 to your computer and use it in GitHub Desktop.
Save jasp402/0a75a2ce390f2f9c31d51dc368780c17 to your computer and use it in GitHub Desktop.
AutoIT - Esperar hasta que exista o se cumpla el timeout
Func waitForExist($element, $iTimeOut)
$sBegin = TimerInit()
While TimerDiff($sBegin) < $iTimeOut
$isExist = WinExists($element)
If $isExist then
ConsoleWrite($isExist&@CRLF)
Return True
Else
ConsoleWrite($isExist&@CRLF)
ContinueLoop
EndIf
Return false
WEnd
EndFunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment