Jump to content

Your World Of Text - Peefans


Sophie

Recommended Posts

Somebody asked if I had found a way of automating / cutting and pasting. Unfortunately I do not know of a way of just simply pasting so I wrote this little python script the other day. It takes anything you write into a txt file and then pastes it onto the website.

Happy to answer any questions!

#! /usr/bin/python3
# -*- coding: utf-8 -*-

import pyautogui
import sys
import time

art = sys.argv[1] # FIrst argument is the script itself, second argument is what you want to paste.
print(f"Printing {art}, get ready!")

time.sleep(5) # Five second delay to open web window.

with open(f"ascii/{art}.txt") as f:
    result = [list(line.rstrip()) for line in f]

for x in result:
    pyautogui.typewrite(x, interval=0.05)
    pyautogui.press("enter")

 

Edited by Sophie
Added extra information.
  • Like 1
  • Thanks 1
Link to post
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...