Advanced Scene Switcher

Advanced Scene Switcher 1.37.2

Hey, I am trying to get some info from a local server with HTTP action and GET. How is it possible to save the GET info in a variable?
 
Can AdvSS collect the changing value of a Midi controller fader/dial in normal operation and set it to a variable? Could you show me how that is done? I can sort of make it work when I'm programming the midi and have the "Start listening" activated, but that value locks to its last known for me every time I click ok.
You can use a setup like this to test the value range:
Example.gif

Just note that if you spam the OBS log too much it might stop working.
If that should happen for you write to a file instead to see the value range.

@Warmuptill Feature Request!

A dock with buttons that could be linked to macros so that I could run them adhoc.
There are times where I have macros triggered to Hotkeys because I want the done manually, not automatically.
Easily allow a button to connect to a macro that trigger system calls (Bat files, scripts, shell etc) from AdvSS.
There's a dock now with the feature to turn AdvSS on/off, a little bit of elaboration to link a macro to a button would be
quite helpful!

View attachment 112450
You can already do something similar by enabling the option to register a dock for a given macro.
Dock.gif


So, I wonder if an HTML/Javascript “template” could be utilized, and a form in AdvSS can make it possible to eliminate having to get into the “programming” side of things?
Unfortunately, I think supporting HTML rendering / Javascript within Advanced Scene switcher might not be a trivial task.

Hey, I am trying to get some info from a local server with HTTP action and GET. How is it possible to save the GET info in a variable?
You could do something similar to this:
1743190385972.png
 
Need some direction here -- Is it possible to queue video media sources to play in sequence after the last is complete? The sources are layered on top of each other so the previous layer would also need to hide itself so the next would be displayed.

Any documentation i can reference would be great.
 
Need some direction here -- Is it possible to queue video media sources to play in sequence after the last is complete? The sources are layered on top of each other so the previous layer would also need to hide itself so the next would be displayed.

Any documentation i can reference would be great.
I assume something like this might work:
1743198383981.png


Alternatively you could set up multiple macros like this to achieve a similar effect:
1743198518495.png


Which approach is better depends on your setup.

The sources are layered on top of each other so the previous layer would also need to hide itself so the next would be displayed.
I would assume that the media sources become transparent after their playback ended.
If they are not you can use this action type to hide scene items:
1743198684553.png


Hope that helps!
 
I assume something like this might work:
View attachment 112469

Alternatively you could set up multiple macros like this to achieve a similar effect:
View attachment 112470

Which approach is better depends on your setup.


I would assume that the media sources become transparent after their playback ended.
If they are not you can use this action type to hide scene items:
View attachment 112472

Hope that helps!

This is indeed, super helpful. Quick Q: In the option with multiple macros, how would you configure the macros to run in sequence one after another? Can i use this for automatic scene transitions?
 
This is indeed, super helpful. Quick Q: In the option with multiple macros, how would you configure the macros to run in sequence one after another? Can i use this for automatic scene transitions?
Assuming you have media sources A, B and C and want them to play in sequence, the first macro checks if the media source A is about to finish playing and starts playing Media source B.
A second macro would check if Media source B is about to end starts Media source C if that is the case.

And you can of course do the same for scene transitions if that is required.
 
@Warmuptill
The docking of scripts as a button you explained above is exactly what I've been looking for. I noticed that if I setup the docks on the OBS desktop, but change to a different scene collection and come back, the docks have disappeared, and I have to select them again from the docks list and lay them out again. I've tried on a couple of different OBS instances on some different windows systems with same behavior. Not a show stopper, just wondering if this is known behavior or not?
 
@Warmuptill
The docking of scripts as a button you explained above is exactly what I've been looking for. I noticed that if I setup the docks on the OBS desktop, but change to a different scene collection and come back, the docks have disappeared, and I have to select them again from the docks list and lay them out again. I've tried on a couple of different OBS instances on some different windows systems with same behavior. Not a show stopper, just wondering if this is known behavior or not?
This is known, but there is not much I can do about it as far as I remember.

OBS will only restore the positions of docks at startup and not when changing scene collections.
This is to be expected as I don’t think there is a scene collection specific dock anywhere in OBS.

But I will check if the behavior on OBS side has changed since the last time I looked at this issue when I find the time.
 
Warmuptill submitted a new resource:

Automatic Scene Switching - Switches to specified scenes depending on which window is in focus



Read more about this resource...
Do you have any idiot proof install instructions? Im a bog standard obs user with basically no tech knowhow at all. I downloaded the "installer exe" and, possibly naively, assumed that would drop this straight into my obs. all im looking to do is switch between 2 scenes of my choosing automatically on a timer. Do i need to download other "assets" too? I thought they were for people that wanted to do manual installs. There is a tool in the list on my obs named correctly, but its menus are not the same as the exaples. i appreciate this is basic stuff to most of you, but any assistance would be greatly appreciated. Or if needs be, being pointed to a simpler / different tool would be fine.

thanks, Bert.
 
Do you have any idiot proof install instructions? Im a bog standard obs user with basically no tech knowhow at all. I downloaded the "installer exe" and, possibly naively, assumed that would drop this straight into my obs. all im looking to do is switch between 2 scenes of my choosing automatically on a timer. Do i need to download other "assets" too? I thought they were for people that wanted to do manual installs. There is a tool in the list on my obs named correctly, but its menus are not the same as the exaples. i appreciate this is basic stuff to most of you, but any assistance would be greatly appreciated. Or if needs be, being pointed to a simpler / different tool would be fine.

thanks, Bert.
Here the steps regarding the installation:
  • Download the installer by clicking the the "Go to download" button at the top of this page.
    InstallerDownlaod.gif

  • Double click on the installer.exe file you just downloaded and click "More info", followed by "Run anyway".
    And follow the installer instructions.
    InstallerRun.gif

  • Launch OBS and confirm that the "Advanced Scene Switcher" entry is available under tools:
    1743446538107.png
Regarding "switch between 2 scenes of my choosing automatically on a timer" you can have a look at the examples here in the wiki:

Let me know if anything was unclear or did not work as you expect it to! :)
 
This is known, but there is not much I can do about it as far as I remember.

OBS will only restore the positions of docks at startup and not when changing scene collections.
This is to be expected as I don’t think there is a scene collection specific dock anywhere in OBS.

But I will check if the behavior on OBS side has changed since the last time I looked at this issue when I find the time
All good! You are right, docks is a 'best effort' situation at best. I'll make it work! The ability to dock these macros at all is a huge feature.
 
Here the steps regarding the installation:
  • Download the installer by clicking the the "Go to download" button at the top of this page.
    View attachment 112507
  • Double click on the installer.exe file you just downloaded and click "More info", followed by "Run anyway".
    And follow the installer instructions.
    View attachment 112508
  • Launch OBS and confirm that the "Advanced Scene Switcher" entry is available under tools:
    View attachment 112509
Regarding "switch between 2 scenes of my choosing automatically on a timer" you can have a look at the examples here in the wiki:

Let me know if anything was unclear or did not work as you expect it to! :)
thanks very much for getting back to me. i have realized my issue. like a complete noob, i hadnt restarted obs. i was doing 3 things at once and that step escaped me at the time! i have since restarted obs and the screens i expected to see have now appeared. i will check out those wiki pages too. thanks again.
 
@Warmuptill
Is there a way, or could it be added :), a way to run a windows CMD directly from AdvSS?
Currently I use the FILE command to echo out the code syntax to a .bat file, then use the RUN command to execute it.
 
Hi! First, man I'm loving this plugin!!

I'm trying to use it to be my "start OBS" workflow.

What I want to do is this:

Check if specific programs are open, if they're not open them. If they are, don't worry and progress onward

I've noticed that I can do "AND NOT" in the logic menu at the start, but if ANY of the programs are open when I close out, the whole macro dies and won't open anyting at all.

Is it possible to do this within a single macro? I'd love to not have to make a separate one for each program I would like to open at launch, but if I have to then so be it. At least the copy process won't make it too difficult.
 
Hello! Thank you so much for the plugin!
I'm experiencing the difficulties with setting up Macro to make it work. This is what I'm trying to do:
IF: Twitch - [Within the last 10.00 seconds / no duration] - [selected channel] - Points reward redeemed - [selected reward] - Check using account [selected] (all permissions are given)
ACTION: Scene item visibility - [selected scene] - Show - [selected source]

If I click Run Macro it works. If I redeem the selected reward it doesn't work. Any thoughts what can be wrong?
Thank you in advance!

OBS 31.0.2
Advanced Switcher 1.29.2
 
@ArdSagart
Perhaps post a couple of screen shots showing your macro. You can copy/paste right into the forum. A picture might be easier to pick out issues
 
Last edited:
@Warmuptill
Is there a way, or could it be added :), a way to run a windows CMD directly from AdvSS?
Currently I use the FILE command to echo out the code syntax to a .bat file, then use the RUN command to execute it.
I am not sure to honest.
If I would do that I would likely have to support all kinds of shells / environments to avoid confusion, which I would want to avoid.

You could however "build your own" action type using the scripting interface.
I assume something like this could do the trick:

Python:
import obspython as obs

# Required by advss helpers
import threading
from typing import NamedTuple

# Required for the custom action
import subprocess

###############################################################################

# Define the settings available for the user for this action type
def get_action_properties():
    props = obs.obs_properties_create()
    obs.obs_properties_add_text(props, "script_to_run", "Script", obs.OBS_TEXT_MULTILINE)
    return props


# Set default values for each setting
def get_action_defaults():
    default_settings = obs.obs_data_create()
    obs.obs_data_set_default_string(default_settings, "script_to_run", "echo \"hello world!\"")
    return default_settings


# The settings for each instance of this action the will be passed in the
# "data" argument
def run_cmd_action(data, instance_id):
    script = obs.obs_data_get_string(data, "script_to_run")
    # Build a single line command to run
    command = " & ".join(script.splitlines())
    result = subprocess.run(command, shell=True, capture_output=True, text=True)
    obs.script_log(obs.LOG_INFO, result.stdout)
    obs.script_log(obs.LOG_INFO, result.stderr)

###############################################################################


def script_load(settings):
    # Register the custom action
    advss_register_action(
        "CMD",
        run_cmd_action,
        get_action_properties,
        get_action_defaults(),
    )

def script_unload():
    advss_deregister_action("CMD")


###############################################################################

# Advanced Scene Switcher helper functions below:
# Omitted for brevity - can be found here:
# https://github.com/WarmUpTill/SceneSwitcher/blob/master/scripting/examples.py#L195-L461
# Just copy paste to the end of the script

I attached the full script to this message. (never mind, can't do that apparently)

Simply import it in the scripts dialog.
1743699655795.png


1743699573700.png


Let me know if you run into any issues!

Is it possible to do this within a single macro? I'd love to not have to make a separate one for each program I would like to open at launch, but if I have to then so be it. At least the copy process won't make it too difficult.
I don't think something like this is possible in a single macro.

Just for my understanding: What are your exact concerns with splitting it up into multiple macros?
If you simply don't want to "clutter" the macro list with too many macros you can group those macros:
Example.gif


Hello! Thank you so much for the plugin!
I'm experiencing the difficulties with setting up Macro to make it work. This is what I'm trying to do:
IF: Twitch - [Within the last 10.00 seconds / no duration] - [selected channel] - Points reward redeemed - [selected reward] - Check using account [selected] (all permissions are given)
ACTION: Scene item visibility - [selected scene] - Show - [selected source]

If I click Run Macro it works. If I redeem the selected reward it doesn't work. Any thoughts what can be wrong?
Thank you in advance!

OBS 31.0.2
Advanced Switcher 1.29.2
I can't spot any obvious issue in the macro you have set up.

Can you please enable verbose logging and share an OBS log file of when you are trying to reproduce the issue?
Are you able to receive other events like for example "Stream went live" after going live?
 
Back
Top