Skip to content

Instantly share code, notes, and snippets.

@jasp402
Last active February 8, 2018 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasp402/87d6157b08ebfdbfab0cb7c2aa8934b0 to your computer and use it in GitHub Desktop.
Save jasp402/87d6157b08ebfdbfab0cb7c2aa8934b0 to your computer and use it in GitHub Desktop.
AutoIT - Buscar titulo de una Ventana
Func findWndTitle($sTitle)
Sleep(2000)
Local $hTitle =''
Local $w_WinList = WinList()
For $i = 1 to $w_WinList[0][0]
If $w_WinList[$i][0] <> "" _
AND BitAnd(WinGetState($w_WinList[$i][1]), 2) _
AND StringInStr($w_WinList[$i][0], $sTitle) _
Then
$hTitle = $w_WinList[$i][0]
EndIf
Next
WinActivate($hTitle)
Return WinWaitActive($hTitle)
EndFunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment