The following example attempts to find a window with the title bar text ôUntitled û Notepad.ö If it is found, a message box is displayed with the text ôNotepad is openö, otherwise a message box with the text ôNotepad is not openö is displayed.
Sub Main
If AutoMate2.FindWindowbyTitle (ôUntitled û Notepadö) > 0
MsgBox ôNotepad is openö
Else
MsgBox ôNotepad is not openö
End Sub