I have an image that can appear any number of times on my screen and it can change how many times it’s on the screen everytime I run my test but its the same image. Call it image1. example, I run my test and I now see image1 7 times on the screen. I want to click all of them and then right click to do an action. Can you help me write this loop or repeat until statement
Look up everyImageLocation() in the documentation.
FHQWHGADS,
I have the below code but it doesn’t seem to hold the click so I can right click and goto some properties for my next action. Please Advise on what I need to change.
show RemoteClient
//Try and Find all images of Overall on screen and right click for properties menu
put everyImageLocation("image_overall") into i
KeyDown ControlKey
Repeat while i > 0
Click item i of everyImageLocation("image_overall")
Subtract 1 from i
End Repeat
KeyUp ControlKey
reposting code still not working
show RemoteClient
//Try and Find all images of Overall on screen and right click for properties menu
put everyImageLocation("image_overall") into i
KeyDown ControlKey
Repeat while i > 0
Click item i of everyImageLocation("image_overall")
Subtract 1 from i
End Repeat
KeyUp ControlKey
The everyImageLocation function returns a list of locations. So what you really want would be something more like this:
show RemoteClient
//Try and Find all images of Overall on screen and right click for properties menu
put everyImageLocation("image_overall") into overallLocations
put the number of items in overallLocations into i
KeyDown ControlKey
Repeat while i > 0
Click item i of overallLocations
Subtract 1 from i
End Repeat
KeyUp ControlKey
If you need a right click (rather than a left click), change the Click command to a RightClick command.
Thanks SenseTalk Works like a charm