Make the script log window appear on the screen w/ LUA script

whbcstreaming

New Member
Hey everyone,

Is there way in a LUA script to force the script log window to appear? I've written a small script that checks to see if a certain device is connected to OBS as an audio input and if not, pop an error message up to the screen to alert my operators that they need to check the connection. The LUA "print" statement doesn't force the log script window to appear and the window isn't visible at startup of OBS.
It must be possible because when OBS has particular issues, it pops up this same window with the error message or alert.
Thanks,
Pat
 
Caveman method is to have your script print your message, then do something that causes a log-showing error. Easiest is to call a non-existing function:
print("Check the connection")
annihilation()

This will generate an error message with script name, line number and something like
attempt to call global 'annihilation'
Ain't pretty, but it pops up the log.
 

whbcstreaming

New Member
That works and it appears to be reproducible without shutting down OBS. Curious if it leaves a hanging callback or any unreleased items that might bite me down the road. Thanks for the idea.
 
Top