Skip to content

Instantly share code, notes, and snippets.

@workze
Last active March 20, 2020 09:01
Show Gist options
  • Save workze/20b59cf9628b86153185ceb76dc782f1 to your computer and use it in GitHub Desktop.
Save workze/20b59cf9628b86153185ceb76dc782f1 to your computer and use it in GitHub Desktop.
python keyboard key
# pip install PyUserInput
from pykeyboard import *
import time
import pyperclip
import datetime
key = PyKeyboard()
i = 0
print('running...')
while True:
# key.press_key(key.print_screen_key)
# key.release_key(key.print_screen_key)
time.sleep(60 * 10 - 2)
clip = pyperclip.paste()
key.tap_key(key.print_screen_key)
pyperclip.copy(clip)
i += 1
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment