Restricting search area along with a Tig and ImageFound

I have seen examples of using SearchArea along with Click and a pre-captured image.

My needs are a bit different. I have a generated TIG that I want to check for in a specified region (the bottom left hand corner of the screen). I see that when I call SetSearchArea that it is deprecated. So, what is the alternative?

Is there anything like:
ImageFound (tigImage, SearchArea( (x,y),(x2,y2))

or a work around for the lack of it?

Comments

  • JonathanOSXJonathanOSX ForumAdmin admin
    You can specify a search override for ANY image by using the property list syntax and including the SearchRectangle property, like this:
    click (ImageName:"MyButton", SearchRectangle:(0,0,200,200))
    
    For setting the global search area, SetSearchRectangle as an independent command has been deprecated (although it still works). We have made the search area part of the Global Properties so you can interact more easily with it. You can access it using "the searchRectangle" like this:
    set the searchRectangle to myRegion
    
    or this:
    put (0,0,200,200) into the searchRectangle
    
Sign In or Register to comment.