import pymouse
from time import sleep
import random
def clicks(time):
randoms = random.randint(0, len(lists) - 2)
sleep(time)
if m.position() not in lists:
print("break:", m.position())
return True
a = m.position()
print(f"{time}s-第{randoms + 1}框:{a}")
m.click(*lists[randoms])
def main():
i = True
while True:
if i:
m.click(*initial)
i = False
randoms = random.randint(2, 7)
if clicks(randoms):
break
initial = (1116, 472)
m = pymouse.PyMouse()
lists = [(654, 207), (660, 263), (647, 320), (655, 377), initial]
main()