-
Is there a part in the code that allows you to change the value of a Text or an image? |
Beta Was this translation helpful? Give feedback.
Answered by
aatikturk
Aug 30, 2023
Replies: 1 comment
-
Hi, That's possible using For initial connection, (from the example in README) >>>import obsws_python as obs
# pass conn info if not in config.toml
>>>cl = obs.ReqClient(host='localhost', port=4455, password='mystrongpass', timeout=3) Now you have a client to make requests to OBS websocket.
>>> resp = cl.get_input_settings("test_string")
# to access the settings inside the resp use input_settings attribute
>>>print(resp.input_settings)
{'text': 'hello world'} Now you know what input settings look like. So you can use this as a template and change the text as you wish using >>> new_settings = {'text': 'WHATS UP'}
>>> cl.set_input_settings("test_string", new_settings, True)
# now text should be changed. Details for each method and their parameters can be found using docstrings >>> help(cl.set_input_settings) Hope it helps |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
onyx-and-iris
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
That's possible using
ReqClient
class.For initial connection, (from the example in README)
Now you have a client to make requests to OBS websocket.
Assume name of the text input is
test_string
. To get the settingsNow you know what input settings look like. So you can use this as a temp…