I apologize this is probably the most advanced way to handle it; but you will learn objects on the way
![Smile :)](./images/smilies/icon_e_smile.gif)
and I also think it is the most scalable to click more locations.
If we save one set of coordinates and click on them like so:
Code: Select all
setOfCoords := {x: 100, y: 333}
click, % setOfCoords.x " " setOfCoords.y
Then we can make an array of coordinates like so and choose randomly from it:
Code: Select all
arrayOfCoords := [{x: 100, y: 333}
, {x: 200, y: 333}
, {x: 300, y: 999}
, {x: 400, y: 333}
, {x: 500, y: 338}
, {x: 600, y: 888}]
; choose a random number from 1 - arrayOfCoords Max
random, index, 1, % arrayOfCoords.count()
; pick the element out of the array
randomCoord := arrayOfCoords[index].clone()
click, % randomCoord.x " " randomCoord.y