Hello, am using Find Image Matches,clicking through the loop,but it clicking out of order.How can i sort it?
sort by what - image name ?
Hello,
What do you mean out of order?
activity you will write in sequence that will execute one after one.
Cheers,
Pankaj
I want that robot clicks in order, not in random order
Robot clicks elements in random sequence, not in order
Can you please share the screen shot ? May be then I get some idea.
I don’t know what the solution is but when you use Find image matches lets say on a screenshot that contains many similar icons in a column. If you iterate through those images they won’t be necessarily in the order they appear in the column on the screenshot. (I think that’s what @dproger is suggesting). I don’t know how to deal with that as I don’t think that there is any way to adjust the way find image matches looks for the image.
Maybe there could be a way of sorting them by their position (X or Y) if that can be retrieved for each of the returned images.
You can access clipping region properties. I had an issue where it wasn’t clicking in order i.e. top to bottom.
Using the Y co-ordinate as something to order will resolve this…Use X if they are on the same row.
imageMatches is your output from from FindImageMatches activity
Use a new assign to imageMatches with the value of something like:
imageMatches.OrderBy(Function(image) image.ClippingRegion.Rectangle.Value.Y)
you saved me there, buddy. Thanks a bunch