FindWindowByTitle Example

 

The following example attempts to find a window with the title bar text 填ntitled Notepad. If it is found, a message box is displayed with the text 哲otepad is open, otherwise a message box with the text 哲otepad is not open is displayed.

 

Sub Main

 If AutoMate2.FindWindowbyTitle (填ntitled Notepad) > 0

  MsgBox 哲otepad is open

 Else

  MsgBox 哲otepad is not open

End Sub