Skip to content

Instantly share code, notes, and snippets.

@jayz3314
Last active November 9, 2024 14:53
Show Gist options
  • Select an option

  • Save jayz3314/66e9ea721c75bf018e421e1e42271467 to your computer and use it in GitHub Desktop.

Select an option

Save jayz3314/66e9ea721c75bf018e421e1e42271467 to your computer and use it in GitHub Desktop.
How to repeatedly delete minecraft chat messages
# You can copy-paste this into IDLE or download the file
# These are our dependencies
# You have to be full-screened in Minecraft for this to work
from pynput.keyboard import Key, Controller
import subprocess
import time
keyboard = Controller()
# Now, let's start configuring our scripts.
def chatdelete():
keyboard.press(Key.f3)
keyboard.press('d')
keyboard.release('d')
keyboard.release(Key.f3)
# Finally, let's run everything!
while True:
chatdelete()
time.sleep(1)
# This should do it! Remember, make sure you have python3 and you have installed
# pynput. Here's how to do it:
# Run this command in shell:
# pip3 install pynput
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment