import pyautogui, time print(‘Press Ctrl-C to quit.‘) try: while True: time.sleep(10) pyautogui.moveRel(1, 0, duration=0.25) time.sleep(10) pyautogui.moveRel(-1, 0, duration=0.25) except KeyboardInterrupt: print(‘\nDone.‘)
时间: 2024-10-13 02:04:01
import pyautogui, time print(‘Press Ctrl-C to quit.‘) try: while True: time.sleep(10) pyautogui.moveRel(1, 0, duration=0.25) time.sleep(10) pyautogui.moveRel(-1, 0, duration=0.25) except KeyboardInterrupt: print(‘\nDone.‘)