import os
import time
os.system("adb shell screencap -p /sdcard/screen.png") # 截屏
os.system("adb pull /sdcard/screen.png") # 保存
def click(x, y):
return os.system(f"adb shell input tap {x} {y}")
if __name__ == '__main__':
for i in range(60):
print(f"進行了{i}次")
time.sleep(4)
click(1435, 865)
print("開始闖關")
print("正在加載")
time.sleep(15)
print("正在戰鬥")
time.sleep(100)
click(100, 100)
time.sleep(5)
print("再次挑戰")
time.sleep(4)
click(1618, 998)
需要 android adb