bitfocus / companion-module-obs-studio

OBS Studio Module for Companion
MIT License
45 stars 28 forks source link

Saving Custom Command response data to variables #284

Closed tomdevlive closed 4 weeks ago

tomdevlive commented 4 weeks ago

I'm not sure if this already exists and I just haven't figured it out. When sending a Custom Command like GetSceneItemTransform, I would like to get positionX and positionY values from the response and save those to custom variables. I don't know where or how to get the response data. Is it there I just don't see it? If so could I do the 'set variable with expression' and pull it that way? Any help would be greatly appreciated.

bryce-seifert commented 4 weeks ago

This should now be possible in the latest Companion beta.

It adds a “custom_command_response” variable which shows the last reply from a custom command call, which you can use with jsonparse to set a variable with an expression, or a variety of other workflows. Hopefully this is helpful!