Advanced Scene Switcher

Advanced Scene Switcher 1.29.3

yukon92

Member
@Warmuptill
Odds are I'm misunderstanding how this command works.
I'm trying to read the contents of file "1.bat"
If contains text "empty" then the route "batch 1 empty"
If it contains anything else, it will go to the "else" route.

Right now, regardless of what contents are in the file, or if I do an if if/not, it always seems to match.

I'm sure its me, is there a suggestion of a way I can do this type of file content match?

1744069227578.png
 

Muscies

New Member
Hi - I need some help with variables.

I'm trying to use a variable to take every chat message on a certain scene and append a text file with each message.

There is a tutorial on github for how to "set variable to text source text", which is the closest thing to explaining what I need, but it uses "Set to condition value", which now says it's a legacy feature. When I select it, I can't even type in the field.

I would really like this to work, if anyone has any ideas.
 

Attachments

  • Screenshot 2025-04-08 163049.png
    Screenshot 2025-04-08 163049.png
    55.2 KB · Views: 10

Muscies

New Member
Ignore that last message.

I lost a lot of my macros due to changing OBS installs. I thought that was one of them, and that I couldn't figure out how to recreate it.
Turns out that was a feature I set up in MixItUp.
 

Warmuptill

Active Member
@Warmuptill

Made some headway, got the CMD to install as per your additional instructions.

It doesn't work, but I do see an error in the log. It appears for me regardless of whatever i put in the box for "Script" I get the same error message in the log. Anything I should check closer?

View attachment 112704
@Warmuptill
Odds are I'm misunderstanding how this command works.
I'm trying to read the contents of file "1.bat"
If contains text "empty" then the route "batch 1 empty"
If it contains anything else, it will go to the "else" route.

Right now, regardless of what contents are in the file, or if I do an if if/not, it always seems to match.

I'm sure its me, is there a suggestion of a way I can do this type of file content match?

View attachment 112708
Sorry I assumed your python installation would be more up to date.
I think if you replace ...
Code:
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)
... with just ...
Code:
subprocess.run(command, shell=True)
... I assume it should work.

Hi - I need some help with variables.

I'm trying to use a variable to take every chat message on a certain scene and append a text file with each message.

There is a tutorial on github for how to "set variable to text source text", which is the closest thing to explaining what I need, but it uses "Set to condition value", which now says it's a legacy feature. When I select it, I can't even type in the field.

I would really like this to work, if anyone has any ideas.
Ignore that last message.

I lost a lot of my macros due to changing OBS installs. I thought that was one of them, and that I couldn't figure out how to recreate it.
Turns out that was a feature I set up in MixItUp.
Glad to hear that you got everything working.
Just for completeness in case you / someone else needs it, you can assign the chat message to a variable like this:
1744131209694.png
 

Tallicia

Member
@Warmuptill So as previously posted, it seems a tad cumbersome to get more than one value from some JSON. Is it possible to add functionality to get nested elements ( hardcoded and variables ) with dot separators? ( items.${Id}.Name ) Below feels like one heckuva an inelegant kludge.

1744218027870.png
 

StefenTower

Member
The new Close Projection has been very useful - thanks again!

I have a related use case with Open Projection that I wonder could be solved with AdvSS. If I set up a macro to open a projection of a scene on a monitor when the current scene changes, when I'm going from scene to scene, these projections "pile up" on the monitor (basically layers of full-screen projections). Of course I could close existing projections before doing the open, but doing that feels a little like overkill. Might there be a way to have a checkbox for Open Projection equivalent to "Replace current projections on this monitor"?
 

Destroy666

Member
@Warmuptill So as previously posted, it seems a tad cumbersome to get more than one value from some JSON. Is it possible to add functionality to get nested elements ( hardcoded and variables ) with dot separators? ( items.${Id}.Name ) Below feels like one heckuva an inelegant kludge.

View attachment 112731

This is a common issue and I keep recommending people to use Run with shell of their choice as of now, e.g. PowerShell on Windows, to handle JSONs. Or, common to all shells, a tool like jq: https://jqlang.org/. All of this can be shortened to 2 actions - said Run and setting variable to standard output macro property returned by that Run.

The syntax you mentioned is e.g. part of JSONPath and alike libraries that provide query syntaxes. Adding support for it within Advanced Scene Switcher would indeed be welcome. An inspiration to look at would e.g. be URL Source plugin which implements that among other things.
 

yukon92

Member
The new Close Projection has been very useful - thanks again!

I have a related use case with Open Projection that I wonder could be solved with AdvSS. If I set up a macro to open a projection of a scene on a monitor when the current scene changes, when I'm going from scene to scene, these projections "pile up" on the monitor (basically layers of full-screen projections). Of course I could close existing projections before doing the open, but doing that feels a little like overkill. Might there be a way to have a checkbox for Open Projection equivalent to "Replace current projections on this monitor"?
Just curious why you are opening up different projections as you change a scene.
do you want only certain projections to show up on the screen, leaving others to not show up?
 

StefenTower

Member
Just curious why you are opening up different projections as you change a scene.
do you want only certain projections to show up on the screen, leaving others to not show up?
For my purposes (which don't always have OBS displayed on top in my primary monitor), I want to see the current scene on a secondary monitor. It's full-screen and thus only one can be seen. I only want to see the single current scene, and these projections take up system resources like anything else. If they pile up too much, OBS seems to wobble a bit. Best to keep them trimmed to one at a time.
 

Warmuptill

Active Member
The new Close Projection has been very useful - thanks again!

I have a related use case with Open Projection that I wonder could be solved with AdvSS. If I set up a macro to open a projection of a scene on a monitor when the current scene changes, when I'm going from scene to scene, these projections "pile up" on the monitor (basically layers of full-screen projections). Of course I could close existing projections before doing the open, but doing that feels a little like overkill. Might there be a way to have a checkbox for Open Projection equivalent to "Replace current projections on this monitor"?
Thanks for the suggestion!
While it might technically be doable to implement such behavior can't you just do something like this?

1744304056360.png


Or if that is not specific enough something similar to this:
1744304129949.png


I will add it to the list but I can't really say when I will get around to it.

@Warmuptill So as previously posted, it seems a tad cumbersome to get more than one value from some JSON. Is it possible to add functionality to get nested elements ( hardcoded and variables ) with dot separators? ( items.${Id}.Name ) Below feels like one heckuva an inelegant kludge.

View attachment 112731
I will try to think of something and have a look a the suggestion made by @Destroy666.
 

StefenTower

Member
Thanks for the suggestion!
While it might technically be doable to implement such behavior can't you just do something like this?

View attachment 112751

Or if that is not specific enough something similar to this:
View attachment 112752

I will add it to the list but I can't really say when I will get around to it.


I will try to think of something and have a look a the suggestion made by @Destroy666.

I am using a different approach to show scene changes now, projecting Preview instead (I am in development and making changes), but given this is the way I'm still doing it, yes, I would close the existing scene projection I know I'm using on a particular monitor before opening a new one. I'm now doing the "close/open projector" routine for 1) switching between Preview and Program on one monitor; and 2) switching between set placards on another monitor. (A "set placard" is what I call a monitor displaying something within the scene I'm shooting).

I am fine with doing it this way, but just thought having a way to do a projection replacement per monitor would make for more efficiently set-up macros. Thank you for considering the idea at any rate!
 

StefenTower

Member
I also need to note I ran into OBS crashes when I was testing with projection closes/opens tonight, and I boiled it down to the crash occurring (more often than not) when I had two closes in a row. Combining these two closes together into one using regex to check for multiple projections to close (e.g. "Fullscreen Projector.*(Placard|\(Program\))") seemed to alleviate the crashes (i.e. I saw no repeat of a crash in multiple tests).
 

Warmuptill

Active Member
I also need to note I ran into OBS crashes when I was testing with projection closes/opens tonight, and I boiled it down to the crash occurring (more often than not) when I had two closes in a row. Combining these two closes together into one using regex to check for multiple projections to close (e.g. "Fullscreen Projector.*(Placard|\(Program\))") seemed to alleviate the crashes (i.e. I saw no repeat of a crash in multiple tests).
Thanks for letting me know!
Can you please send me a crash log?
 

StefenTower

Member
Thanks for letting me know!
Can you please send me a crash log?
This is a strange one. I just ran it through again to confirm the crash. But just like yesterday, it is a total OBS crash with no crash log presented or saved in the crashes folder.

But if you're trying to recreate it, both of the Close Projector actions used RegEx and each worked on projections that happened to be on separate monitors.
 
Last edited:

StefenTower

Member
This is a strange one. I just ran it through again to confirm the crash. But just like yesterday, it is a total OBS crash with no crash log presented or saved in the crashes folder.

But if you're trying to recreate it, both of the Close Projector actions used RegEx and each worked on projections that happened to be on separate monitors.
I don't know if this will help, but I am attaching regular OBS logs, one in which the crash occurs (two Close Projector in a row) and another one where there is no crash (combined Close Projector). The first log (w/ earlier time of day) is missing a lot of info the second log has - maybe there is a clue in there.
 

Attachments

  • 2025-04-11 16-45-51.txt
    85 KB · Views: 0
  • 2025-04-11 16-35-41.txt
    35.3 KB · Views: 1

kanewesley

New Member
Hello Warmuptill,

I recently discovered and started using your software, and it’s truly amazing. Thank you so much for your work! After diving deeper into it, I’ve compiled some issues I encountered and a few feature suggestions I’d like to share with you.

**Issues:**
1. When editing complex macros (e.g., with 5-6+ conditions or 7-8+ actions), clicking to operate the macro becomes extremely laggy. It takes around 10-20 seconds to respond. Not sure if this is specific to my setup?
2. Occasionally, the software causes OBS to crash and close abruptly, possibly due to resource limitations or similar issues.

**Feature Requests:**
1. **Image Matching**: For example, detecting specific in-game structures or units by matching images on the screen and retrieving their coordinates.
2. **Mouse Control**: Using the coordinates obtained from image matching to move the cursor to targeted positions and perform left/right clicks or other mouse actions.
3. **UI Color Adjustments**: The current dark-themed interface makes it hard to distinguish selected vs. unselected items, and the overall dim color scheme strains the eyes when managing multiple conditions/actions. A brighter or more vibrant palette would improve readability and workflow efficiency.

Thank you for your dedication!

Best regards,
A user from China
 

_dsd_

New Member
Is there an easy way to change file paths if I have a file set as a macro? I was creating macros on my laptop but when I imported them to the PC I am going to stream to, I had to manually relink all my files. I'm still fairly new so forgive me if there's an easier way to doing this.
 
Is there an easy way to change file paths if I have a file set as a macro? I was creating macros on my laptop but when I imported them to the PC I am going to stream to, I had to manually relink all my files. I'm still fairly new so forgive me if there's an easier way to doing this.
Try using variables.... It removes the need to change the value in one place versus have to remember which marcos need to be updated

1744531022422.png


1744531032368.png
 
Top