FindWindowContaining Example

 

The following example tries to find a window that contains the text 鄭ccess violation. If a window is found, a message box is displayed with the text 展indow found. Otherwise, a message box with the text 展indow NOT found is displayed.

 

Sub Main

 If AutoMate2.FindWindowContaining (鄭ccess violation) > 0

  MsgBox 展indow found

 Else

  MsgBox 展indow NOT found

 End If

End Sub