WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Windows UDFs

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Check for Window Containing Specific Text


Check for existence of window containing specific text
#DefineFunction udfWinExistText( WindowTitle, WindowText )
   ;-----------------------------------------------------------------------
   ; Check for existence of window containing specific text
   ;-----------------------------------------------------------------------
   If !WinExist(WindowTitle) Then Return @FALSE
   If WindowText=="" Then Return @TRUE
   If StrIndexNC(WinItemChild(WindowTitle),WindowText,1,@FWDSCAN)>0 Then Return @TRUE
   Return @FALSE
#EndFunction

ret = udfWinExistText( WindowTitle, WindowText )
If ret == @FALSE
    Pause( 'udfWinExistText', 'Window containing that text was NOT found')
Else
    Pause( 'udfWinExistText', 'Window containing that text was found' )
EndIf

Exit

Article ID:   W18418
Filename:   Check for Window Containing Specific Text.txt
File Created: 2008:11:25:12:13:58
Last Updated: 2008:11:25:12:13:58