Resource icon

Free Command line tool for obs-websocket plugin (Windows) 1.5.1

FSC

Member
The response format is a json string

For performance reasons I would use dos commands, to start e new Powershell still takes more time than command line

Example:

0 to 100 if it was 0
Code:
FOR /F "tokens=* delims=" %%A IN ('OBSCommand.exe "/command=GetSourceFilterInfo,sourceName=QueueGroup,filterName=Fade" ^| FINDSTR /I "opacity.:.0" ') DO (OBSCommand.exe "/fadeopacity=QueueGroup,Fade,0,100")
100 to 0 if it was 100
Code:
FOR /F "tokens=* delims=" %%A IN ('OBSCommand.exe "/command=GetSourceFilterInfo,sourceName=QueueGroup,filterName=Fade" ^| FINDSTR /I "opacity.:.100" ') DO (OBSCommand.exe "/fadeopacity=QueueGroup,Fade,100,0")
 

kutibotond

New Member
Thanks, this works but it's incomplete because I think I didn't explain my full intention. So I'm using a command to trigger the source fade. Now if multiple commands ask for the source fade in, then it won't fade in multiple times, that's great. There is one more thing. If midway trough the fade out the fade in gets triggered again, it should stop fading in and turn back from the current opacity number to fade in. So I think the if would look something like:

if the current opacity is not 100
then continue fade in from current opacity number (may not be 0 in case it's midway trough fading out)

fade out after 10 seconds (from 100 to 0)
 

FSC

Member
Thanks, this works but it's incomplete because I think I didn't explain my full intention. So I'm using a command to trigger the source fade. Now if multiple commands ask for the source fade in, then it won't fade in multiple times, that's great. There is one more thing. If midway trough the fade out the fade in gets triggered again, it should stop fading in and turn back from the current opacity number to fade in. So I think the if would look something like:

if the current opacity is not 100
then continue fade in from current opacity number (may not be 0 in case it's midway trough fading out)

fade out after 10 seconds (from 100 to 0)
Version 1.5.1 should help with that, you can put -1 in startopacity or endopacity to fade from/to current value

You might insert a command at the start in your batch file to kill any OBSCommand.exe task before you start a new one to prevent 2 or more tasks fighting with each other like
taskkill /F /IM OBSCommand.exe
 
Top