"I would like to know is there any way by which we can find and click a set of images within the boundary/searchrectangle. "
I’m not sure what you mean by clicking “a set of images”. The command you gave is correct for finding a single image within a restricted area and clicking it.
“Also please explain how to find out the coordinates to set the searchRectangle.”
The imageLocation() function will return the coordinates of an image on the screen. So one way to do this is to capture images of two corners of the area in which you want to constrain the search (it may be helpful to keep in mind that you can reposition the HotSpot of an image to any place relative to the image). A rectangle can be specified using two points, so you could set the searchRectangle like this:
set the searchRectangle to (imageLocation("TopLeft"), imageLocation("BottomRight"))
You can also calculate one coordinate from another. For example, you might use an image to find the top left corner, then set a rectangle that is 200 pixels wide and 100 pixels tall like this:
put imageLocation("TopLeft") into topLeftCorner
set the searchRectangle to (topLeftCorner, topLeftCorner+(200,100) )