前スレの >>575 です。
海外のAHKスレで解決してもらえました。

#SingleInstance Force
Return

; Hotkeys to move left/right
*Right::btn_move_click(1)
*Left::btn_move_click(0)

; Btn clicker
btn_move_click(dir) {
Static x_arr := [10, 200, 300, 400, 500, 600, 700, 800] ; x 座標の配列Array of your x coords
, index := 1 ; 現在いる配列のインデックスを追跡するTrack the array index you're at
If (dir) ; If dir 1 (right)
index++ ; インデックスを1つ増加させるIncrement the index by 1
Else index-- ; Elseで1つ減少Else decrement by 1
If (index < x_arr.MinIndex()) ; インデックスが最小未満の場合If index is less than min
index := x_arr.MaxIndex() ; Set to max
Else If (index > x_arr.MaxIndex()) ; インデックスが最大値より大きい場合Else if index greater than max
index := x_arr.MinIndex() ; Set to min
Click, % x_arr[index] " 0" ; x_arrとインデックスを使用してクリックClick using x_arr and index
}