FindWindowByClass Example

 

The following example attempts to find a window with the classname of ôNotepad.ö If it is found, a message box is displayed with the text ôNotepad class existsö, otherwise a message box with the text ôNotepad class does not existö is displayed.

 

Sub Main

 If AutoMate2.FindWindowbyClass (ôNotepadö) > 0

  MsgBox ôNotepad class existsö

 Else

  MsgBox ôNotepad class does not existö

End Sub