A small utility that will read from multiple files and type them at a predefined speed
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
670 B

import keyboard
import time
# Usage: main.py <delay> <filenames>
def main(filenames, delay):
print("running autotyper, abort by pressing F6")
for filename in filenames:
print("reading %s" % (filename))
with open(filename, "r") as file_handle:
for chars in file_handle.read():
if keyboard.is_pressed("f6"):
print("user aborted")
keyboard.write(chars, delay)
if __name__ == "__main__":
print("Starting autotyper in 5s")
import sys
delay = float(sys.argv[1])
filenames = sys.argv[2:]
sys.exit(main(filenames, delay))