Advanced Scene Switcher

Advanced Scene Switcher 1.29.3

Warmuptill

Active Member
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?
This is not an issue with your setup and a known issue.

This is caused by the plugin having to construct all widgets used to control all the conditions' / actions' settings.
If you use one of the more complicated actions or conditions (e.g. Video condition) this will make things even worse.

I am not sure yet how to best tackle this type of issue, but I am aware of the problem.

2. Occasionally, the software causes OBS to crash and close abruptly, possibly due to resource limitations or similar issues.
If you have any crash logs you can share I will have a look at the problem and fix it as soon as I can.
At the moment I am not aware of any known crashes.

1. **Image Matching**: For example, detecting specific in-game structures or units by matching images on the screen and retrieving their coordinates.
Image pattern matching is already possible by using the "Video" condition type.
You can find more information here:
Extracting the coordinates of the match is not possible at the moment.

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.
I will think about it.
But I assume implementing this with cross platform support might be tricky.

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.
The colors used are mostly based on the selected OBS UI theme.

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.
Just an idea:
You could export your settings to a text file and "search and replace" the file paths.
Once that is done you can re-import the settings.
 
Last edited:

JPD

New Member
Hello.
Unfortunately, my English and my knowledge are reaching a limit where I need to ask for your help.
I would like to use a variable to store the values of several other variables.

Action:
Set to fixed value / Variable1 /
${ACW_Cam11}
${ACW_Cam12}
${ACW_Cam13}
${ACW_Cam14}...

The result in Variable1 is then:
1
0
0
1...

So far, everything is fine.
How do I transfer the values from Variable1 back to the other variables?
 

Destroy666

Member
Hello.
Unfortunately, my English and my knowledge are reaching a limit where I need to ask for your help.
I would like to use a variable to store the values of several other variables.

Action:
Set to fixed value / Variable1 /
${ACW_Cam11}
${ACW_Cam12}
${ACW_Cam13}
${ACW_Cam14}...

The result in Variable1 is then:
1
0
0
1...

So far, everything is fine.
How do I transfer the values from Variable1 back to the other variables?

You can use multiple Variable Set to substring of current value actions with `.*?\n` regex and increase the match number for each variable. But then all the variables will need to be set to the full value first as the action supports working only on a single variable, you can't set the result to a different one.
 

JPD

New Member
You can use multiple Variable Set to substring of current value actions with `.*?\n` regex and increase the match number for each variable. But then all the variables will need to be set to the full value first as the action supports working only on a single variable, you can't set the result to a different one.
Thanks, Unfortunately, I don't understand this proces
I thought if I could put values into a variable with a separator, it would work the other way around too.

${a} | ${b} | ${c} | ${d} | ${e} in Variable1 results in 0 | 1 | 1 | 0 | 1

Variable1 (with separator ' | ') in ${a} | ${b} | ${c} | ${d} | ${e} results in Variable a = 0...
 

Destroy666

Member
Thanks, Unfortunately, I don't understand this proces
I thought if I could put values into a variable with a separator, it would work the other way around too.

${a} | ${b} | ${c} | ${d} | ${e} in Variable1 results in 0 | 1 | 1 | 0 | 1

Variable1 (with separator ' | ') in ${a} | ${b} | ${c} | ${d} | ${e} results in Variable a = 0...

That's a different case than you described. Please stick to one. Although this one is similar, you just need `.*? | ` as regex.

1744652456133.png


And you need to do it 5 times to extract all the values, with a-e as the variables that need full content first and 1-5 as the match number.
 
Last edited:

JPD

New Member
That's a different case than you described. Please stick to one. Although this one is similar, you just need `.*? | ` as regex.

View attachment 112821

And you need to do it 5 times to extract all the values, with a-e as the variables that need full content first and 1-5 as the match number.
Thank you very much!
Because of my different separators, I'm slowly starting to understand how to solve this.
`.*?\n` didn't make sense to me. \n=line feed. Got it.
I'll look into it further soon.
Thanks again!
 

kanewesley

New Member
This is not an issue with your setup and a known issue.

This is caused by the plugin having to construct all widgets used to control all the conditions' / actions' settings.
If you use one of the more complicated actions or conditions (e.g. Video condition) this will make things even worse.

I am not sure yet how to best tackle this type of issue, but I am aware of the problem.


If you have any crash logs you can share I will have a look at the problem and fix it as soon as I can.
At the moment I am not aware of any known crashes.


Image pattern matching is already possible by using the "Video" condition type.
You can find more information here:
Extracting the coordinates of the match is not possible at the moment.


I will think about it.
But I assume implementing this with cross platform support might be tricky.


The colors used are mostly based on the selected OBS UI theme.


Just an idea:
You could export your settings to a text file and "search and replace" the file paths.
Once that is done you can re-import the settings.

Hello Warmuptill,

Thank you for your response. I resolved the color scheme issue by switching the OBS UI. As for the image matching and subsequent mouse control, I'm also exploring whether there are alternative solutions.

Additionally, I noticed what might be a bug: When performing video OCR recognition, I used a custom language recognition file trained specifically for a particular font. However, I found that every time I restart OBS, it seems to revert to the default "eng" OCR training file, even though the displayed name doesn’t change. When I move the cursor and click again on the custom file name, then click elsewhere, it appears to reload the custom OCR training file—since the results differ from those of the "eng" file.

Could you try reproducing the scenario I described? Is it because OBS defaults to the "eng" recognition model upon startup, and clicking the custom file again forces it to load the new model?
 

mercifulmerc

New Member
Could someone please elaborate how I can, make this switch between two Source Media Files (One on>Two off>One ends>One off>Two on>Two off>One back on>Loop). Rinse and repeat. Thats all I want this to do. Seems like an extremely simple macro that I have spent over 15 hours trying to work.
 

Warmuptill

Active Member
Could someone please elaborate how I can, make this switch between two Source Media Files (One on>Two off>One ends>One off>Two on>Two off>One back on>Loop). Rinse and repeat. Thats all I want this to do. Seems like an extremely simple macro that I have spent over 15 hours trying to work.
The are multiple ways to achieve this effect:

If you want to keep everything in a single macro you could use a setup like this:
1744741762296.png


The "Plugin is running" condition will always be true when the plugin is active.
This will ensure that the actions will be performed in a loop.

The first action will (re)start the playback of the first media source.
The next two actions - "Wait" and "Wait for playback to stop ..." - will ensure that the subsequent "Restart" action for the next media source will only be performed once the playback of the first media source has stopped.
(The "Wait 1 second" step might not strictly be necessary, but I would recommend to keep as it might take a short moment for OBS to execute the "Restart")
Afterwards the same series of actions is performed for the next media source.

The "Run macro in parallel to other macros" option is checked to ensure other macros are not blocked while this macro is waiting.
The "Perform actions only on condition" change option is not checked as we want this macro to always be executed.

You can import this example macro using this code:
Code:
AAAOHHic7Vffb9owEP5XkJ9JRUKhhbeWMQ1p3dhge5mqyiRHsHDsyD8YFeJ/39kJSWi7burD2lVFQpi77+4+f3eOnB3JaKykJsMfOyJoBmRIxlua5RxIm6RK2pwMl5RraJOcWg0zuoFLWNENk4oMO6W1gVGUc+BkaJTF/1KMVlSkNUCvWT7eQvxZzAxVprYbmV/EhkmhJ8tP0ryTog5ydVdSmRFTsWVmvKHcUodtIkYWc2QjKRLmXKMVxOuJMKAQXeHiR0E74jJDY9E5iQZ3Pm1ibnPn2mNZwYxXYQNKez4hWhMZr2dgDBOpdrkUpExjjYrFiuqvVlxaY1xIoRTapk7Ke1bUyVj9kS6g3saKpSuOXzNZVnvRc2VrydQh/xy2SJFgPVI268juaxK3k/u+b4UNvfFRkYJRCarrt6iClqN9chTx3hF6LMQzdjFOt0mCAJpstA78ZAbOGJzG/QGltB/06Fk3OA273WDR7/WCwaJ3nvSjMOn0Hc2jLvjwYqSqgrOcM4OdmErNivnBsc/d+Ie98327XJ91O/vrMsEYuRVJfh/bH9SxPvLQ8A/SrOFWH5+gwojR15XqTZORacphetdc6+nrakgzEKY5ZbHknOYakvuH4nh44qaNXN22uF+2CQi64C6+mL0jNZnrS85tysSNxmY6ublMWezHP7HKn8crmbAlc5O+I4ZlcIO0tVGUieKYaHD70A+ftM6fTta+IQMZRkc+lIjGz61PBgmj5MCEDLtuxxz8v3mxtVqrJ4rgUsJ6CirG/dG0Gd27E+7pzKRFqG/IgUH5nL9y7lbhb4XEZcacMDswfiimQk0MZA8jWbKdN9bFL6J9tDsnz9ObnxS1fFz98G/UPySIntw/x6RSqOl5KWN7/ja2L2Zs/+NHSvTae/P2SHmNj5R/NbZ4Y4HqcqmLWx4TuTXfqWJOXm9zsE3DUL2lYTcOQNRZ42vZRcnAKQtLajlm8mpgtep69MWChbJapSUJ8TXnpBuEUZBGndNBFPVQhV/BlcOC
(You will have to readjust the media source selections after importing the example macro)

Alternatively you could use multiple macros like this:

1744742515604.png

1744742535572.png


The first macro ensures to restart "Media Source 2" if the playback of "Media Source 1" ended.
And the second macro ensures that "Media Source 1" is restarted if the playback of "Media Source 2" ended.
This closes the loop and the actions will be performed continuously.

This time it is important to check "Perform actions only on condition change" so the media sources are not continuously immediately restarted over and over.

You can import these example macros using this code:
Code:
AAAPZXic7VZtb9owEP4ryJ9JRUKSAt9ayjSkdesK25epmoxzBItgR35BdKj/feckhFC6bl2lqZOoVNU533Mvz935uiUrypTUZPBtSwRdARmQ0Yau8gxaAWmTVEmbk4FRFqqPK2ooGWwJk1lGcw0JGcxppvFa8x8IDx4e2rWpW9CGKtO6hoTTpsEKklOrYULXcAkLuuZSkUGnkjZ0FM0yyGqBFMMFFSnswtJLno82wD6JiXO2j8fI/IIZLoUezz9KcyXF3qrzu5DKDLlilpvRmmaWOt2mxtCijdVQioS7q+EC2HIsDCjUrvXYs0pb4ixD49A5C/qPftrE3Ofu6gHdCm4KFtagdBGPj9JEsuUEjOEi1c6WgpRr9FFHsaD61opLa4yDlMSg7MZReSRFnozVH+isweqCp4sMf814Xueip8ruKVM7+1PYGFdcK0hVrAN54ZO4TI7vvpQyvGUHTsqIKqW9/xZV0HJhnx0g3rmAnoMUETuM422MLUpostbaK5rdc0JvFodRF5KZl7Bu4IX9877X85O+FwVx1/d7EHeikDyqQgEvW6p2OMkzbrASN1Lzsn9wknI3UX4Yu1Eoz7344a4yMMLYSiPPYKOwxnYcclfw99Is4V4fTlApRPRdzXpTZGSaZnDzWLzns/CrIV2BMM0uO57xeigOm4c1ZeT6vpUVxzYBQWeZw5e9d8Amd3VZuZcBFTOZclb0fWJVMYjXMuFz7lp8SwxfwXeMVxtFuSjnQ4NLQD89Yp3fjRSKtbSKFbBKtb17tsrnalLct3zidBkImEAGrKzTMYbUFqe7G+aegvoLX0KDp9jVEvPglaXuPuO/TOXgA+tK2VspKt3nqHfc1Xy8OmsNsLwBJFwYmjbR0SN4Ec7kz6odvKDaTmtsYPW0Jk8208a5/IvaBdrVCep3QJcDyUVuzVequKO3kP1ylfqnVXpapW9llZ7P+915ApHnd3Gfhj7reX3oBN4sAsriKAhjmL92lYaNVdp74SqNT6v0bazSlzyup1X6v6/Sl/zj9A9WKUrXDUG9WLEaO0XkWeMGvagicMzCnNoMLRVsoLe6KT5bsFB5q7kkPm6ks67nB14adMJ+EETY8z8B+1xDaw==

Which way is the "correct" one depends on your exact requirements, but to mention a few key differences:
  • This first setup (single macro) is easier to maintain.
    If an additional media source needs to be added into the chain you can simply insert more actions to the list.
  • The second setup (multiple macros) allows more fine grained control when the (re)start of the other media source happens exactly.
    For example pausing / stopping one media source will not automatically result in the next media source being restarted in the second setup while in the first one it does.
There probably are even more ways to set this up, but I hope this will get you on the right track.

In general feel free to reach out if you get stuck on a problem.
I am always happy to help!
 
Last edited:

kanewesley

New Member
Hello Warmuptill,

Thank you for your response. I resolved the color scheme issue by switching the OBS UI. As for the image matching and subsequent mouse control, I'm also exploring whether there are alternative solutions.

Additionally, I noticed what might be a bug: When performing video OCR recognition, I used a custom language recognition file trained specifically for a particular font. However, I found that every time I restart OBS, it seems to revert to the default "eng" OCR training file, even though the displayed name doesn’t change. When I move the cursor and click again on the custom file name, then click elsewhere, it appears to reload the custom OCR training file—since the results differ from those of the "eng" file.

Could you try reproducing the scenario I described? Is it because OBS defaults to the "eng" recognition model upon startup, and clicking the custom file again forces it to load the new model?
I have repeatedly confirmed that the default language check model is indeed set to "eng," and after restarting OBS, you must click the input field of the language model file name for it to take effect. Each condition must be clicked individually—unclicked conditions will not be applied. Simply clicking "Check Match" does not equate to clicking the name input field.
 

Warmuptill

Active Member
I have repeatedly confirmed that the default language check model is indeed set to "eng," and after restarting OBS, you must click the input field of the language model file name for it to take effect. Each condition must be clicked individually—unclicked conditions will not be applied. Simply clicking "Check Match" does not equate to clicking the name input field.
Sorry I somehow missed your earlier message!
I can confirm that I am also able to reproduce the issue and was able to identify the root cause.
A build with a fix will be available here in a few minutes:
You will have to be logged into GitHub to be able to download it.
Let me know if that should be a problem and I will share the test build another way.
 

kanewesley

New Member
Sorry I somehow missed your earlier message!
I can confirm that I am also able to reproduce the issue and was able to identify the root cause.
A build with a fix will be available here in a few minutes:
You will have to be logged into GitHub to be able to download it.
Let me know if that should be a problem and I will share the test build another way.
Hello Warmuptill,

Thank you for your reply and effort. I’ve already downloaded your update, and the issue has been resolved! This recognition problem was a huge hassle for me—I do a lot of OCR work, and clicking through each one manually was very time-consuming. What’s worse, the macro would often lag, requiring long waits. Now, this problem is finally solved!

I’ve noticed some issues with the math operations. If an OCR-recognized numerical value is misidentified as another letter or symbol, the math operation can fail, sometimes causing OBS to crash or close unexpectedly, requiring a restart. For now, I’m using some validation to ensure that misrecognized characters don’t get included in calculations, which should reduce the chance of crashes.

Occasionally, OBS seems to crash even without any calculations happening. I’ll continue to monitor the situation and figure out the cause, then provide feedback as soon as possible.

Thanks again!
 

Warmuptill

Active Member
Hello Warmuptill,

Thank you for your reply and effort. I’ve already downloaded your update, and the issue has been resolved! This recognition problem was a huge hassle for me—I do a lot of OCR work, and clicking through each one manually was very time-consuming. What’s worse, the macro would often lag, requiring long waits. Now, this problem is finally solved!

I’ve noticed some issues with the math operations. If an OCR-recognized numerical value is misidentified as another letter or symbol, the math operation can fail, sometimes causing OBS to crash or close unexpectedly, requiring a restart. For now, I’m using some validation to ensure that misrecognized characters don’t get included in calculations, which should reduce the chance of crashes.

Occasionally, OBS seems to crash even without any calculations happening. I’ll continue to monitor the situation and figure out the cause, then provide feedback as soon as possible.

Thanks again!
I am glad to hear that the problem is resolved!
If you already have crash logs from the crashes you have observed feel free to share them and I will have a look.
 

Warmuptill

Active 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
A build with additional options to modify JSON values contained in variables is available here on GitHub:
Note that you will have to be logged in to be able to download it.
If that should be a problem I upload it somewhere else.

For example, let's assume My Variable has the following value:
JSON:
{
    "books":
    [
        {
            "category": "fiction",
            "title" : "A Wild Sheep Chase",
            "author" : "Haruki Murakami",
            "price" : 22.72
        },
        {
            "category": "fiction",
            "title" : "The Night Watch",
            "author" : "Sergei Lukyanenko",
            "price" : 23.58
        },
        {
            "category": "fiction",
            "title" : "The Comedians",
            "author" : "Graham Greene",
            "price" : 21.99
        },
        {
            "category": "memoir",
            "title" : "The Night Watch",
            "author" : "Phillips, David Atlee"
        }
    ]
}

This set of actions actions ...

1744917101743.png


... will then reduce the value to The Night Watch.

Let me know if everything works as expected / if you have feedback.
 

kanewesley

New Member
我很高兴听到问题解决了!
如果您已经拥有所观察到的崩溃日志,请随时分享,我会查看。
I’ll check and organize the error logs. Right now, I’m still a bit unsure whether I need the regular logs or the error logs specifically. I’ll keep an eye on the crashes to make sure I can capture useful logs.
 

kanewesley

New Member
I’ll check and organize the error logs. Right now, I’m still a bit unsure whether I need the regular logs or the error logs specifically. I’ll keep an eye on the crashes to make sure I can capture useful logs.
This is the logs file.
 

Attachments

  • 2025-04-18 20-29-22.txt
    102.9 KB · Views: 10

StadiumPK

New Member
There is a way. :)
Instead of typing in the text directly you could reference a variable instead.

You can then control the value of the variable via a separate macro. (For example by reading the value for the variable from a file)


This can be configured by clicking on the regular expression button. (.*)
View attachment 106864

Hi again,

Trying my hand at this idea again, but not getting anywhere. I can't seem to set the variable to be the text source, which the text source itself is referencing its own file source (not static text, but the text inside the .txt file). The "get current settings" and current value" are both blank, not sure what I am doing wrong.

If I set the text manually, it does seem to grab it - but looking to make this a bit more dynamic via the source file because each game my teammates change and I'd like to be able to set teammate1 = character name 1, 2 =2 etc.

The other thing is, i'm not sure how to ask the macro to skip itself until a new line is created... here is the use case.

The kill feed shows who has died, and stays on that line position for 5-7 seconds then disappears - however, it could get bumped if another player dies within that same window, screenshot below.

Video example: https://streamable.com/z0yfqt
(you can see deaths go from 8 to 9, because I pattern matched the "continue button"), so I can track my own K/D ratio but trying to track my teammates via the kill feed.

Line 1 on the screen initially is "BoT slain by Baba"
then quickly after another person dies and Line 1 now becomes Line 2, Line 1 is now "cT was slain by Kaal", etc.

So it's like I need the script to not read Line 1 and spam the hotkey counting kills every 1 second, but also be smart enough to read a different line is created.

Maybe this is too complicated because of the different situations.

Any ideas?
 

Warmuptill

Active Member
Okay, these two logs. Thank you very much!
Thanks for sharing the crash log!

If I am interpreting the crash log correctly, I don't see any direct involvement of the advanced scene switcher in the crash.
OBS seems to crash when saving the scene collection data.

By default the plugin triggers the saving of the scene collection data when ...
  • closing the advanced scene switcher settings window
  • switching between macros
Does that match your observations?
If it does, do you know what settings you had changed beforehand?
(Maybe some special text characters are triggering the crash)
 
Top