repeat loop with images

I had a question with some sensetalk code I was trying…I have several of the same images on my screen…I want to click on each one except the first one…I have the code as

Repeat with each item of EveryImageLocation(“ImageName”)
click it
End repeat

Is there any way I can do this for item 2 to last instead of all items in the list…

Hi sanjit–

I think this will get you there:

put (a,b,c) into myList

repeat with n = 2 to the number of items in myList
	put item n of myList
end repeat

Allen

That will work fine. Or you can try it using the wording from your question: “Is there any way I can do this for item 2 to last instead of all items in the list…”

repeat with each item of item 2 to last of everyImageLocation("ImageName")
    click it
end repeat

:slight_smile: