How to setsearchRectangle based on a reference point

Anyone help me out with the syntax for - How to setSearchRectangle based on a reference point (button).

Hi coolmahen–

You can set the search rectangle based on an image search as well as regular co-ordinates using the imageLocation() function:

put imageLocation("topLeftImage") into top_left
put imageLocation("bottomRightImage") into bottom_right

set the searchrectangle to (top_left, bottom_right)

You can also combine the above into a single line like this:

set the searchrectangle to (imageLocation("topLeftImage"), imageLocation("bottomRightImage"))

Hope this helps!

Allen

Thanks Allen javascript:emoticon(’:lol:’)

My query is little bit different.i have only 1 image available to capture .That will be my reference point.I need a make a search rectanngle based on the co-ordinates .

Assuming there is a dropdown button.once i clicked the dropdown button .i want to seach for an image in the dropdown list .i want to move my searchrectangle co-ordinates based on the dropdown button.

If the Image is not available in the Rectangle.How to change the rectangle co-ordinate by using repeat loops for n times.

Hope you catch my question

Thanks in Advance