Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
typebot.py/typebot.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
37 lines (21 sloc)
946 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Typebot text typer for MacOS, Windows, and Linux - Jack Baumgartel""" | |
import pyautogui | |
import time | |
pyautogui.FAILSAFE = True | |
starttime = 20 | |
#Recieve message from user | |
#print('What is your message?\n') | |
message = input('What is your message?\n') | |
#Split the message into individual words | |
words = message.split() | |
#Recieve number of repetitions from user | |
repeats = int(input("How many times would you like to repeat this message?\n")) | |
#Instruct user on operation | |
print('\nOpen the location you wish to write your message, click in the type area, \nand wait! The program will start typing your message in {}s. To end the \nprogram, move your cursor quickly to any corner of your screen!'.format(starttime)) | |
#Delay the start | |
time.sleep(starttime) | |
#Repeatedly type the message, pressing 'enter' in between each word | |
for j in range(repeats): | |
for i in range(len(words)): | |
pyautogui.typewrite(words[i]) | |
pyautogui.press("enter") | |