Macro Scheduler 15

FindWindowWithText

FindWindowWithText>text_to_find,setfocus_flag,result_variable

 

This function attempts to locate a window containing somewhere within it the text specified in text_to_find.  setfocus_flag can be set to 1 or 0.  If set to 1, the function will activate the window it finds containing the specified text.  If a window is found, result_variable will contain the found window's title text.  If no window is found it will contain "NOT FOUND".

 

If the WIN_USEHANDLE variable is set to 1 result_variable will contain the window's handle.

 

NB. Not all text can be detected successfully.  Some applications, such as Word Processors, in order to provide their more complex functionality have to display text in the form of graphics, so do not manifest textual data to other applications.  FindWindowWithText uses the same routines as the View System Windows tool.  So to see what text can be detected at any particular time use the View System Windows tool.

 

This function is useful when an application has two windows with the same name, and allows the correct one to be located and focused.

 

Abbreviation : Fin

 

Example

 

FindWindowWithText>Continue,1,windowname