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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...