Skip to content

Instantly share code, notes, and snippets.

@OhkuboSGMS
Created July 10, 2023 13:54
Show Gist options
  • Save OhkuboSGMS/d228c6e8c5f20d2c96de0bd32e419c2c to your computer and use it in GitHub Desktop.
Save OhkuboSGMS/d228c6e8c5f20d2c96de0bd32e419c2c to your computer and use it in GitHub Desktop.
import itertools
from time import sleep
# pip install obsws-python
import obsws_python as obs
OBS_PASSWORD = '<OBS-Password>'
TARGET_SOURCE_NAME = '<ソースに表示されているなまえ>'
obscl = obs.ReqClient(host='localhost', port=4455, password=OBS_PASSWORD)
# resp =obscl.set_input_settings('sub_text',{},True)
# このソースの情報を取得
# get_xxxで情報を取得
# set_xxxで情報を設定
resp = obscl.get_input_settings('sub_text')
print(resp.attrs())
print(resp)
for a in itertools.accumulate('君は強いファイターだ'):
print(a)
obscl.set_input_settings('sub_text', {'text': a}, True)
sleep(0.1)
@OhkuboSGMS
Copy link
Author

2023-07-10 22_54_44-Window

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