toggle := false #MaxThreadsPerHotkey 2 F1:: { global toggle := !toggle While toggle { if PixelSearch(&Px, &Py, 1091, 306, 1456, 659, 0xe9c62c, 10) Found() } Return } Found() { MouseClick "Right" Sleep 1000 }