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-12-17 17:09:56
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.‘)