Skip to content

Instantly share code, notes, and snippets.

@Ddedalus
Created June 19, 2020 08:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ddedalus/57c81148d154ad03754dffce6571105f to your computer and use it in GitHub Desktop.
Save Ddedalus/57c81148d154ad03754dffce6571105f to your computer and use it in GitHub Desktop.
Type out the contents of the clipboard
"""
This script types the content of your clipboard.
# setup:
pip install pyautogui, pyperclip
# usage:
python ./type_clipboard.py
# notes:
- You may want to assign execution of this script to a keyboard shortcut.
- Fancy text editors may mess up the output with their autocomplete or lags.
"""
import pyautogui
from pyperclip import paste
# capture clipbord content
s: str = paste()
# type it out with 0.05s pauses between keystrokes
pyautogui.typewrite(s, interval=0.05)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment