Skip to content

Instantly share code, notes, and snippets.

@AyaanZaveri
Last active November 26, 2021 22:35
Show Gist options
  • Save AyaanZaveri/33beaf1f881ba3e553021bfc7c272548 to your computer and use it in GitHub Desktop.
Save AyaanZaveri/33beaf1f881ba3e553021bfc7c272548 to your computer and use it in GitHub Desktop.
Aaron's Thing
#Importing the module that controls the keyboard.
import pyautogui as pag
#Importing the module that allows the program to sleep.
from time import sleep
#Making the program sleep for a 3 seconds.
sleep(3)
#Function that recieves the sentence and splits it's it into a list for pyautogui.
def words(sentence):
sentence = list(sentence)
pag.press(sentence)
print("Done Aaron's Thing.")
#Running the function and passing in the tongue twister as the sentence.
words("Peter Piper picked a peck of pickled peppers. How many pickled peppers did Peter Piper pick?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment