Created
April 18, 2021 14:59
-
-
Save FaltoGH/fbb74a770bf238df93ce7ec54e50537a to your computer and use it in GitHub Desktop.
Control the Minecraft Bukkit with Python!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32gui, win32con, time | |
server = win32gui.FindWindow(None, 'C:\\WINDOWS\\system32\\cmd.exe') | |
def command(x): | |
for y in x: | |
win32gui.PostMessage(server, win32con.WM_CHAR, ord(y), 0) | |
win32gui.PostMessage(server, win32con.WM_CHAR, 13, 0) | |
while True: | |
command('say Hello world!') | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment