Created
September 16, 2022 09:03
-
-
Save nekochanfood/7e6d12b61e85e82f25d788f460f0e378 to your computer and use it in GitHub Desktop.
VRChat Chatbox OSC
This file contains hidden or 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 argparse | |
from sqlite3 import Date, Time | |
import time | |
import schedule | |
import psutil | |
from pythonosc import udp_client | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--ip", default="127.0.0.1", | |
help="The ip of the OSC server") | |
parser.add_argument("--port", type=int, default=9000, | |
help="The port the OSC server is listening on") | |
args = parser.parse_args() | |
client = udp_client.SimpleUDPClient(args.ip, args.port) | |
a = " " | |
def send(message): | |
client.send_message("/chatbox/input",[str(message),True]) | |
def update(): | |
send("CPU: " + str(psutil.cpu_percent(interval=1)) + "%" + a + "RAM: " + str(psutil.virtual_memory().percent) + "%") | |
# datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")" | |
schedule.every(10).seconds.do(update) | |
while True: | |
schedule.run_pending() | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment