on performClickSequence() tell application "Sidekick" to activate delay 1 tell application "System Events" tell process "Sidekick" set frontmost to true -- Perform clicks at the specified coordinates do shell script "/usr/local/bin/cliclick c:979,457" delay 0.9 do shell script "/usr/local/bin/cliclick c:966,481" delay 2.3 do shell script "/usr/local/bin/cliclick c:1671,647" delay 3.2 end tell end tell end performClickSequence -- Main loop set clickCount to 0 repeat 500 times performClickSequence() set clickCount to clickCount + 1 -- Optional: Uncomment the next line if you want to see the current iteration count -- log "Completed iteration " & clickCount -- Check if script should stop (you can modify this condition as needed) if clickCount ≥ 500 then exit repeat end if end repeat