from pynput.keyboard import Key,Controller import time
keyboard = Controller()
time.sleep(60)
# 1
keyboard.press(Key.enter)
keyboard.release(Key.enter)
# 2
i = 0
while i < 4:
keyboard.press(Key.tab)
keyboard.release(Key.tab)
i = i + 1;
# 3
i= 0
while i < 3:
keyboard.press(Key.enter)
keyboard.release(Key.enter)
i = i + 1;
# 4
i = 0
while i < 4:
with keyboard.pressed(Key.shift):
keyboard.press(Key.tab)
keyboard.release(Key.tab)
i = i + 1;
我希望上面的代码无限循环,但它不起作用。怎么了?
你能给我一些建议吗?关于 GUI 和 EXE 归档