Scratch
New Member
I've been having trouble with this for several hours.
I've been looking at other's people's code, as the samples multiple times
The data is being stored in the basic.ini file, however, whenever the script is loaded, it is not being applied.
My code looks exactly like this
I've been looking at other's people's code, as the samples multiple times
The data is being stored in the basic.ini file, however, whenever the script is loaded, it is not being applied.
My code looks exactly like this
Code:
UNIQUE_CODE = "brownpants"
hotkey_id = obs.OBS_INVALID_HOTKEY_ID
...
def script_load(settings):
hotkey_id = obs.obs_hotkey_register_frontend("randomVideo_{}".format(UNIQUE_CODE), "Play Random Video ({})".format(UNIQUE_CODE), hotkey_pressed)
hotkey_save_array = obs.obs_data_get_array(settings, "randomVideo_{}".format(UNIQUE_CODE))
obs.obs_hotkey_load(hotkey_id, hotkey_save_array)
obs.obs_data_array_release(hotkey_save_array)
def script_save(settings):
hotkey_save_array = obs.obs_hotkey_save(hotkey_id)
obs.obs_data_set_array(settings, "randomVideo_{}".format(UNIQUE_CODE), hotkey_save_array)
obs.obs_data_array_release(hotkey_save_array)