Skip to content

Instantly share code, notes, and snippets.

@pmnlla
Last active December 13, 2020 19:39
Show Gist options
  • Select an option

  • Save pmnlla/bc233e4ea225072d7c0f1447bd3b9b7e to your computer and use it in GitHub Desktop.

Select an option

Save pmnlla/bc233e4ea225072d7c0f1447bd3b9b7e to your computer and use it in GitHub Desktop.
Share the shrek script with your friends
import pyautogui as auto
src = open("script.txt", "r")
auto.click(1700, 100);
for x in src:
print(x)
auto.write(x)
# To those who came from TikTok: I can't help you if you just say "it doesn't post the shrek script".
# Please make a video showing what happens in your messaging app and the console output.
# Also, make sure you followed the instructions correctly. They are below.
#
# You need to have pyautogui installed via pip,
# along with the shrek script saved as "script.txt"
# in the same folder. Each line will be sent seperately,
# so don't put everything on one line.
# Also, the app will click on the coordinates 1700, 100 to focus
# on your messaging app. It runs really fast, so if you use Discord
# you're bound to get ratelimited.
#
# Inspired by @hoppuman on TkTok.
@Xenotta-Alt
Copy link

I tried this (copy and pasted it exactly into notepad++) but it said "NameError: name 'typewrite' is not defined" so I assumed maybe that was because you (maybe typo, i assumed this because the two lines under it have periods not commas) put a comma between pyatogui and typewrite, but when I added a period instead of a comma it said,"NameError: name 'enter' is not defined"

That is because 'typewrite' does not exist and is not part of the pyautogui library. Use 'write' instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment