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

Add option for capture the command output to script log #9

Closed IT-VBFK closed 1 year ago

IT-VBFK commented 1 year ago

Proposal for #8

Closes #8

marklagendijk commented 1 year ago

@IT-VBFK awesome that you are picking this up! Does io.popen by any chance not popup a window when it's executing the command (on Windows)? That would be even more awesome, because that is the main issue this script currently has.

IT-VBFK commented 1 year ago

I don't know actually :D

WIll test this tomorrow (on windows and macOS)

IT-VBFK commented 1 year ago

Ok, checked on macOS now

https://recordit.co/trDFNsN7ku

this seems to work like excpected

IT-VBFK commented 1 year ago

io.popen opens a cmd windows on windows as well for a blink of an eye.

After googling a bit: this is only possible with external lua extensions, which are not built in in the lua obs uses.

marklagendijk commented 1 year ago

@ IT-VBFK thanks a lot for this PR! I did a code review and added a few (nitpicky) comments.

IT-VBFK commented 1 year ago

Ok thanks

What about using io.popen in every case, since it makes no difference?

This allows an other refacoring

marklagendijk commented 1 year ago

What about using io.popen in every case, since it makes no difference?

Sure, go for it!

marklagendijk commented 1 year ago

Thanks for the work and quick reactions! I released a new version both on GitHub and the OBS versions.