Skip to content

Instantly share code, notes, and snippets.

View catboy1357's full-sized avatar
๐Ÿˆ

catboy catboy1357

๐Ÿˆ
View GitHub Profile
@catboy1357
catboy1357 / OSC Logger.py
Created April 27, 2023 08:08
A simple script made to log all the OSC data from VRChat into a file.
from pythonosc.dispatcher import Dispatcher
from pythonosc.osc_server import BlockingOSCUDPServer
from os import path
from time import time
from datetime import datetime
class OSCLogger:
# Print message to console when the class is initiated
print("Starting! use Ctrl+C to exit")
# requires the python-osc library. If you need to install the modual use:
# "pip install python-osc"
from pythonosc.udp_client import SimpleUDPClient
from datetime import datetime as d
from time import sleep
# sets up an osc sender
client = SimpleUDPClient("127.0.0.1", 9000)
# main
@catboy1357
catboy1357 / Test VRC OSC.py
Last active December 21, 2023 08:43
Quick example code to send a single parameter in vrc
# requires the python-osc library. If you need to install the modual use:
# "pip install python-osc"
# You can find the values in:
# "~\AppData\LocalLow\VRChat\VRChat\OSC\{userId}\Avatars\{avatarId}.json"
from pythonosc.udp_client import SimpleUDPClient
def get_user_input():
address = input('Parameter Name: ')
data_type = input('Type: 1 int, 2 bool, 3 float: ')
@catboy1357
catboy1357 / Copypasta quoter.py
Last active August 30, 2022 20:42
Scripts to test the new chat box
# This requires the following packages:
## python-osc, a txt file, Bee movie script = https://gist.github.com/MattIPv4/045239bc27b16b2bcf7a3a9a4648c08a
from posixpath import split
import sys, time, math
from pythonosc import udp_client
# Global variables
text = None
client = udp_client.SimpleUDPClient("127.0.0.1", 9000)
file_path = "C:/Your/Derectory/Path"
@catboy1357
catboy1357 / send and receive.py
Last active August 1, 2023 00:36
A code snippet for vrchat to send and receave at the same time.
# requires the python-osc library. If you need to install the modual use: "pip install python-osc"
import threading
from pythonosc import osc_server, dispatcher, udp_client
# Makes a thread to run the server in the background.
def start_server(ip="127.0.0.1", port=9001):
print(f"Listening on {ip}:{port}")
server = osc_server.ThreadingOSCUDPServer((ip, port), dispatcher)
thread = threading.Thread(target=server.serve_forever)
thread.daemon = True