GetTextPos


 

GetTextPos>text_to_find,left,top,right,bottom

 

Searches the screen for the specified text and if found returns the containing rectangle's (left,top,right,bottom) screen coordinates.

 

If the text is not found left, top, right and bottom will all be set to -1.

 

The text can contain regular expressions.

 

GetTextInit must be called before this function will work.

 

See also: GetTextAtPoint, GetWindowTextEx, WaitScreenText, GetTextReset, GetTextInit, GetTextInRect

 

Example:

 

GetTextInit

GetTextPos>File,X1,Y1,X2,Y2

 

//click in center

Let>x={%X1%+((%X2%-%X1%) div 2)}

Let>y={%Y1%+((%Y2%-%Y1%) div 2)}

MouseMove>x,y

LClick