How to set SearchRectangle

How to set searchrectangle dynamically.
I have to read that data with the help of 1 image.

I using everyimagelocation for getting count of images.
but not able to add searchrectangle for each image.

Depends on a lot of things. I’d need more details (and a screenshot would be nice) before I could guess at the sort of solution you’d need. It sounds like you are going to need a repeat though at least, then your rectangle can be dynamic for each location. Something like:
repeat for everyimagerectangle(“imageoftest”)
put readtext(topright of it, bottomright of it+[250,0])
end repeat

image

6/16/22, 9:20:27 AM	START		Running Selection from Studies/Studies_Rectangle.script
>>> 09:20:27 Start handler 1: studies_studies_rectangle
repeat for everyimagerectangle("imageoftest")
6/16/22, 9:20:27 AM	everyimagerectangle	imageoftest	found 3 images
	put readtext(topright of it, bottomright of it+[250,0])
6/16/22, 9:20:27 AM	readtext		(203,227,453,241)
first
end repeat
	put readtext(topright of it, bottomright of it+[250,0])
6/16/22, 9:20:27 AM	readtext		(203,263,453,277)
second
end repeat
	put readtext(topright of it, bottomright of it+[250,0])
6/16/22, 9:20:28 AM	readtext		(203,299,453,313)
third
end repeat

<<< 09:20:28 End handler 1: studies_studies_rectangle (normal exit)
Selection Executed in 0:00:00

Dynamic searchrectangles used with repeats are just about the most powerful tool in sensetalk. You can write whole “QA Engines” that search a screen for all the things you care about. You can feed them property lists that change the dynamics and add multiline conditional statements that deal with outliers. You can add functions to it all that make it virtually limitless in utility.

Thank you so much… I tried it and working fine :slightly_smiling_face:

When you find an image, you can then get the “FoundImageInfo()” which is a property list of all the information related to the found image.

if ImageFound( --Text/Image search params–) then log FoundImageInfo()