Skip to content
Advertisement

Tag: keystroke

Python: Generate random letter then Keystroke said letter

(I am using Python under Mac OS) Hey Guys, i am looking for a way to random generate a letter (a-z) and then keystroke it. The way I usually do keystrokes is: cmd = “”” osascript -e ‘tell application ‘System Events’ to keystroke “insert_letter_here”‘ “”” os.system(cmd) This won’t accept random.letter since it would keystroke the exact spelling of random.letter. Does

Advertisement