marklagendijk / obs-scene-execute-command-script

OBS script for executing any CLI command whenever whenever a scene is activated
MIT License
28 stars 6 forks source link

[Feature] - Capture command output in script log #8

Closed IT-VBFK closed 1 year ago

IT-VBFK commented 1 year ago

Hi

This script is a little gem 🥳

But I have a little feature request: In my scenario I am running HTTP web requests and I want to somehow give the user a hint if something went wrong (e.g. a condition on the server's side is not met) (the server I am requesting this is also hosted by me, returning some json data)

For now it would be enough to store it to the script log. Is there a simple solution to achieve this?

marklagendijk commented 1 year ago

It seems that this is not possible with the current approach with os.execute. It might be possible if io.popen works with OBS: https://stackoverflow.com/a/5243210/665825

The script would have to be changed to use that.

IT-VBFK commented 1 year ago

Ok thanks for the hint :)

It might be possible if io.popen works with OBS

looks promissing, will try it :) https://obsproject.com/forum/threads/transformer.106874/post-412595