Text Images

Hi ,

Please find attached screenshot for reference and to understand my functionality

I have a Functionality where i want to find using text image.


global LastName,FirstName

Lastname and FirstName are variables defined in my script

I Store the values for the variables in an Excel and read it from apple script and passed the variables to the script for the respective field of the screenshot i attached.

Now i do a find opertation which finds the person and in my script i wait until the results are found.

then i click on the result section by referencing the textImage.

Script is

After passing the variables to the respective field

Click “Find”

Wait Until ImageFound (“0 of 1 selected”)

Click (Text: LastName ,TextFont:“Lucida Grande”,TextSize:“10”)

If the LastName has the Value say “User26” and FirstName “Sonar”

Here the Problem I face is my script clicks on the LastName i.e User26 which exist first in the screen,

But i want it to click on the results section after find where there is one more User26.

How to make text Image search to "Click (Text: LastName ,TextFont:“Lucida Grande”,TextSize:“10”) " to click the place we want ?

Can anyone help me out in this :slight_smile:

Thanks in advance

I would recommend that you use a search rectangle to define the region of interest.

Click (Text: LastName ,TextFont:"Lucida Grande",TextSize:"10", SearchRectangle:Below("SearchResultsImage")) 

You can find additional examples of setting the Search Rectangle as well as a useful Helper suite here: