@Warmuptill, et. al.
Before I jump into a rather detailed set of questions I'd first like to say I greatly appreciate Adv Scene Switcher, and the time and effort you've obviously put into it.
I hope I'm not overlooking something, but after spending several days digging through Adv Scene Switcher functionality (and searching) I can't find a "clean" way to do something that seems fairly common.
We stream twice a week -- once on Wednesday and again on Sunday (worship services). The Wednesday stream has a dedicated stream key and the Sunday stream has a dedicated stream key. There's nothing else different between the services (as far as OBS goes), so only one set of (rather involved) macros is needed to manage the OBS life cycle for both services (which are triggered by hotkeys, either directly, or indirectly through an AutoIT menu).
So..., in our case it seems like we need a way to conditionally set an Adv Scene Switcher variable based on day of week -- in the actions of a macro (not as the trigger). So the hotkey-triggered macro that manages the livestream startup for both Wednesday and Sunday can conditionally set the right stream key based on the day of week before starting the livestream -- within the list of actions for that macro.
I initially tried using a different macro (triggered by date / day of week) to set an Adv. Scene Switcher variable to the appropriate stream key (and then the macro that starts the livestream used that variable to set the OBS stream key before starting the stream). But..., if "Perform actions only on condition change" is enabled, Adv. Scene Switcher doesn't always run a macro triggered only on day of week (my guess is that if Adv. Scene Switcher isn't running when the day of week actually changes at midnight, it doesn't recognize the macro hasn't fired yet when OBS starts on a different day). If "Perform actions only on condition change" is not set, there is no reliability issue because the macro is running every 300ms, 100% of the time -- which is almost certain to occur before the livestream startup macro is initiated by hotkey. But..., having a macro run 3x a second 100% of the time just to make sure a variable is set accurately based on day of week, doesn't seem like a particularly clean/elegant approach.
If a macro triggered only on day of week shouldn't immediately trigger the next time OBS is run on a different day by design (the macro is ordered above the macro that manages livestream start), than it seems like the next most-elegant way(s) of potentially addressing this need would be:
- Having a way to set Adv Scene Switcher variables to a program's stdout output (so we can call PowerShell to produce a needed value).
- Or, a way to set Adv Scene Switcher variables to a program's exit code, and then:
- Have a way to conditionally set an Adv Scene Switcher variable based on another variable's value (preferably with a value for true and a different value for false).
From what I can tell the ability to do things conditionally within macro actions is currently a bit limited in this regard(?) -- unless I missed something?
So right now I'm resigned to thinking the only way to cleanly set the stream key based on day of week is to have AutoIt set an environment variable to it before launching OBS. (But that's also not as clean as I'd prefer because it means AutoIt has to know about stream keys and, the environment variables won't be set if OBS is started separately from AutoIt.)
TIA...