Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

peejaygee

New Member
You didn't miss anything - currently this is not supported :)


Just to clarify:
Is your intention to automatically open up the interaction dialog or to automate the interaction with the source itself?
The former should be rather straight forward to implement, while the latter might require quite a bit of work.

In case of the latter, can you provide more details what type of interaction is required? (mouse movement, key presses, etc.)

Update:
A build for the former functionality is available here:
View attachment 97009
Note that you have to be logged into GitHub to be able to download it.
Let me know if that should be a problem or if you run into issues with the build.


You Sir are a gentleman and a scholar.

That is exactly what I needed. I had a tendency to forget (old age) to open the 'interact-able' window that I call from my touch portal, using keys through AHK to press and do stuff.

Again, thank you for your time and tweaking to allow me to have the option I needed.
 

Warmuptill

Active Member
Would anyone recommend a video tutorial how to set a timer to start and stop obs recordings of your/my screen?
Unfortunately you haven't really given many details about what you want to set up.
Here is an example macro how to create a timer which stops the active recording once it runs out:

OpenSettings.gif


I assume what you are trying to set up is very different, but I hope this example helps you getting started.
Let me know if you have any questions! :)

Just to mention it:
If what you are trying to set up is really that simple, I don't think you need this plugin and can instead use the "Output Timer" tool that is built into OBS.
 

morvynf

New Member
The advanced scene switcher with a timer macro works fine!. Is it possible to duplicate this macro for streaming purposes rather than recording?
 

Warmuptill

Active Member
The advanced scene switcher with a timer macro works fine!. Is it possible to duplicate this macro for streaming purposes rather than recording?
Sorry if I am misunderstanding your question - Are you referring to the example form above?

If so, then yes.
You can also stop streaming by using the "Streaming" action:
Capture.PNG
 

DruidArena

New Member
I just installed this today, and noticed while jumping between scenes, that OBS would soft-crash (all scenes became blank and no sources would work) after a few transitions, and sometimes fully crashed when adding new conditions. Is this add on aware of these kinds of bugs?
 

Warmuptill

Active Member
I just installed this today, and noticed while jumping between scenes, that OBS would soft-crash (all scenes became blank and no sources would work) after a few transitions, and sometimes fully crashed when adding new conditions. Is this add on aware of these kinds of bugs?
I am not aware of any crashes at the moment.
Could you please share the crash logs?

If you are able to reliably reproduce the problem, it would be very much appreciated if you can share the steps!
Thank you! :)
 
Last edited:

ShinzoOshiro

New Member
Really noob issue but im struggling to download this plugin. Had no issue the first time but for some reason if I download the installer for windows 64x It comes up with a message saying "I need to install an app for this task"
 

Warmuptill

Active Member
Really noob issue but im struggling to download this plugin. Had no issue the first time but for some reason if I download the installer for windows 64x It comes up with a message saying "I need to install an app for this task"
Unfortunately I am not sure what you are referring to here.
Can you share a screenshot?

Excuse me,

Which version of the Advanced Scene Switch can be used for OBS 27.2.4
The last one compatible with OBS 27 is this one:
 

Warmuptill

Active Member
@Destroy666, @PNO, I now started work on a "else" block which should allow simplifying your macro setups.
Here is a quick demo of the general workflow of adding an "else" action to a macro:

ElseAction.gif


The "else" section is hidden by default as to not confuse new users with the additional section.
I would love to get some feedback if everything works as you expected or if there are things I should consider changing.

A build with this feature will be available here in a few minutes:


Just to mention it - there is also a potentially breaking change included in this build:

Previously the "Perform actions on condition change" would also affect how the condition state of a macros was evaluated.
Previously macros with this option enabled would only be considered to be evaluating to "true" for the interval in which the conditions turned true.
Now they are considered to be evaluating to true and the "on change" option only has an effect on if the actions are performed or not.
This could cause issues if you were previously relying on this behaviour in combination with the "Macro" condition type, but this should hopefully be very niche.

This was necessary to be able to support the "else" actions also being affected by the "Perform actions only on condition change" option.
(And I also think it makes more sense logically as the option only mentions actions being affected)
 

Destroy666

Member
Awesome, that's a huge one! It'll simplify setups a lot. Already few macros are gone :P

I tested it with a bunch of macros so far and noticed no issue. I'll be streaming today so I'll see if it continues to work well.

BTW, just to make sure, you can't copy/paste actions/conditions between macros as of now, right?
 

PNO

New Member
@Destroy666, @PNO, I now started work on a "else" block which should allow simplifying your macro setups.
Here is a quick demo of the general workflow of adding an "else" action to a macro:

View attachment 97276

The "else" section is hidden by default as to not confuse new users with the additional section.
I would love to get some feedback if everything works as you expected or if there are things I should consider changing.

A build with this feature will be available here in a few minutes:


Just to mention it - there is also a potentially breaking change included in this build:

Previously the "Perform actions on condition change" would also affect how the condition state of a macros was evaluated.
Previously macros with this option enabled would only be considered to be evaluating to "true" for the interval in which the conditions turned true.
Now they are considered to be evaluating to true and the "on change" option only has an effect on if the actions are performed or not.
This could cause issues if you were previously relying on this behaviour in combination with the "Macro" condition type, but this should hopefully be very niche.

This was necessary to be able to support the "else" actions also being affected by the "Perform actions only on condition change" option.
(And I also think it makes more sense logically as the option only mentions actions being affected)
@Warmuptill - I greatly appreciate you tackling this suggestion. Your explanations make total sense. I would be happy to test as soon as available. Thank you so much!
 

Warmuptill

Active Member
Awesome, that's a huge one! It'll simplify setups a lot. Already few macros are gone :P

I tested it with a bunch of macros so far and noticed no issue. I'll be streaming today so I'll see if it continues to work well.
Glad to hear that it is working so far :)
Let me know if any issues should pop up!

BTW, just to make sure, you can't copy/paste actions/conditions between macros as of now, right?
Correct, that is currently not possible.
You can only copy macros themselves.

@Warmuptill - I greatly appreciate you tackling this suggestion. Your explanations make total sense. I would be happy to test as soon as available. Thank you so much!
I plan on releasing a new version once OBS 30 releases.
If you want to give it a try already a build is available at this link:

Note that you have to be logged into GitHub to be able to download it.
Let me know if that should be an issue and I can try to share the build with you via other means.
 

Walter Schulz

New Member
Hi!

I'm using this tool to corner some hardware bug in an environment with an unholy amount of devices between source (PC) and end device (monitor). In case of hick-ups (screen going blank for seconds) an action is triggered writing some string to a log file.
I'm looking for a way to add actual time to string. I'm not any good in programming and testing strings like %time% wasn't successful. Machine running OBS is using WIndows 11. Is it possible to get this done and if so: What is the proper syntax to grab system time?

Thanks in advance and kudos to the mind creating this plug-in!
 

Warmuptill

Active Member
Hi!

I'm using this tool to corner some hardware bug in an environment with an unholy amount of devices between source (PC) and end device (monitor). In case of hick-ups (screen going blank for seconds) an action is triggered writing some string to a log file.
I'm looking for a way to add actual time to string. I'm not any good in programming and testing strings like %time% wasn't successful. Machine running OBS is using WIndows 11. Is it possible to get this done and if so: What is the proper syntax to grab system time?

Thanks in advance and kudos to the mind creating this plug-in!
You will have to use a macro similar to this one to get the current system time.

1694109469279.png


If you want to import the example macro you can use this code:
Code:
{"macros":[{"name":"Get Date","pause":false,"parallel":false,"onChange":false,"skipExecOnStart":false,"group":false,"dockSettings":{"register":false,"hasRunButton":true,"hasPauseButton":true,"hasStatusLabel":false,"highlightIfConditionsTrue":false,"runButtonText":"Run","pauseButtonText":"Pause","unpauseButtonText":"Unpause","conditionsTrueStatusText":"Conditions are true.","conditionsFalseStatusText":"Conditions are false."},"registerHotkeys":false,"pauseHotkey":[],"unpauseHotkey":[],"togglePauseHotkey":[],"conditions":[{"collapsed":false,"id":"date","logic":0,"durationModifier":{"time_constraint":0,"seconds":{"value":{"value":0.0,"type":0},"unit":0,"version":1}},"dayOfWeek":0,"condition":0,"dateTime":"Thu Sep 7 19:56:14 2023","dateTime2":"Thu Sep 7 19:56:14 2023","ignoreDate":false,"ignoreTime":true,"repeat":false,"updateOnRepeat":true,"duration":{"value":{"value":0.0,"type":0},"unit":0,"version":1},"dayOfWeekCheck":true,"pattern":".... .. .. .. .. .."}],"actions":[{"collapsed":false,"id":"variable","enabled":true,"variableName":"Variable name here","variable2Name":"Invalid varialbe selection","strValue":"","numValue":0.0,"condition":5,"segmentIdx":0,"subStringStart":0,"subStringSize":0,"regexPattern":".*","regexMatchIdx":0,"findStr":"Text to find","replaceStr":"Text to replace with","regexConfig":{"enable":false,"partial":true,"options":0},"mathExpression":"( 1 + 2 * 3 ) / 4","useCustomPrompt":false,"inputPrompt":"Assign value to variable:","useInputPlaceholder":false,"inputPlaceholder":"--enter text--","environmentVariableName":"USERPROFILE"}]}],"version":"c375daa"}

You can reference the variable in your "File" action which you use to write the log entry using this syntax:
${Variable name here}

So an example action could look like this:
1694109779983.png

And will produce output similar to this:
[Thu Sep 7 20:00:49 2023] new log entry

Hope that helps!
 

gamerino

New Member
That should be doable with the following set of macros:
You can import these example macros using the following settings:
Code:
{"macros":[{"name":"Get current slide name","pause":false,"parallel":false,"onChange":true,"skipExecOnStart":false,"group":false,"dockSettings":{"register":false,"hasRunButton":true,"hasPauseButton":true,"hasStatusLabel":false,"highlightIfConditionsTrue":false,"runButtonText":"Run","pauseButtonText":"Pause","unpauseButtonText":"Unpause","conditionsTrueStatusText":"Conditions are true.","conditionsFalseStatusText":"Conditions are false."},"registerHotkeys":false,"pauseHotkey":[],"unpauseHotkey":[],"togglePauseHotkey":[],"conditions":[{"collapsed":false,"id":"slideshow","logic":0,"durationModifier":{"time_constraint":0,"seconds":{"value":{"value":0.0,"type":0},"unit":0,"version":1}},"condition":0,"source":{"type":0,"name":"Image Slide Show"},"index":{"value":0,"type":0},"path":""},{"collapsed":false,"id":"slideshow","logic":102,"durationModifier":{"time_constraint":0,"seconds":{"value":{"value":0.0,"type":0},"unit":0,"version":1}},"condition":2,"source":{"type":0,"name":"Image Slide Show"},"index":{"value":0,"type":0},"path":""}],"actions":[{"collapsed":false,"id":"variable","enabled":true,"variableName":"Image Path","variable2Name":"invalid variable selection","strValue":"","numValue":0.0,"condition":5,"segmentIdx":1,"subStringStart":0,"subStringSize":0,"regexPattern":".*","regexMatchIdx":0,"findStr":"Text to find","replaceStr":"Text to replace with","regexConfig":{"enable":false,"partial":true,"options":0},"mathExpression":"( 1 + 2 * 3 ) / 4","useCustomPrompt":false,"inputPrompt":"Assign value to variable:"}]},{"name":"Set Caption","pause":false,"parallel":false,"onChange":true,"skipExecOnStart":false,"group":false,"dockSettings":{"register":false,"hasRunButton":true,"hasPauseButton":true,"hasStatusLabel":false,"highlightIfConditionsTrue":false,"runButtonText":"Run","pauseButtonText":"Pause","unpauseButtonText":"Unpause","conditionsTrueStatusText":"Conditions are true.","conditionsFalseStatusText":"Conditions are false."},"registerHotkeys":false,"pauseHotkey":[],"unpauseHotkey":[],"togglePauseHotkey":[],"conditions":[{"collapsed":false,"id":"variable","logic":0,"durationModifier":{"time_constraint":0,"seconds":{"value":{"value":0.0,"type":0},"unit":0,"version":1}},"variableName":"Image Path","variable2Name":"invalid variable selection","strValue":"","numValue":0.0,"condition":5,"regexConfig":{"enable":false,"partial":false,"options":0}}],"actions":[{"collapsed":false,"id":"source","enabled":true,"source":{"type":0,"name":"Text (GDI+)"},"action":2,"sourceSettingButton":{"id":"","description":""},"settings":"{\n    \"text\": \"${Image Path}\"\n}\n","deinterlaceMode":0,"deinterlaceOrder":0}]}],"version":"1.23.1"}

Let me know if you have any questions or need further details! :)
Hey there, I came seeking the same kind of macro (text showing the filename during a slideshow.)
I imported the macro, replaced the source names with my own slideshow source and text source.
but the Image Path Variable wasn't added in from the import. I tried making my own but the text box is just blank. it's not actually grabbing the Image Path. did I miss a step?
 

Warmuptill

Active Member
Hey there, I came seeking the same kind of macro (text showing the filename during a slideshow.)
I imported the macro, replaced the source names with my own slideshow source and text source.
but the Image Path Variable wasn't added in from the import. I tried making my own but the text box is just blank. it's not actually grabbing the Image Path. did I miss a step?
It is difficult to say without seeing your settings, so just a few guesses:
Have you checked that the variable name and the usage of the variable in the text source settings match?
Is the plugin actually running?
Is the slide show "active"? (The plugin will only receive updates if the slide changes)
 

gamerino

New Member
It is difficult to say without seeing your settings, so just a few guesses:
Have you checked that the variable name and the usage of the variable in the text source settings match?
Is the plugin actually running?
Is the slide show "active"? (The plugin will only receive updates if the slide changes)
All I did was import your script and make my own variable called "Image Path," so i'm pretty sure the text matches up. I didn't do anything else when making the variable. does the Plugin just automatically know what Image Path is? or do I have to put some other stuff in?
I think the plugin is running? It says Active on the General Page, and I clicked Run Macro on each of the macros on the macro tab. I'm new to this so I might have missed a step?
yes the slideshow is active.
here are screenshots of those macros as well
image_2023-09-08_130641218.png

image_2023-09-08_130735498.png

image_2023-09-08_130848189.png
 

Warmuptill

Active Member
All I did was import your script and make my own variable called "Image Path," so i'm pretty sure the text matches up. I didn't do anything else when making the variable. does the Plugin just automatically know what Image Path is? or do I have to put some other stuff in?
I think the plugin is running? It says Active on the General Page, and I clicked Run Macro on each of the macros on the macro tab. I'm new to this so I might have missed a step?
yes the slideshow is active.
here are screenshots of those macros as well
View attachment 97474
View attachment 97475
View attachment 97476
It seems like the problem is somehow related to the slide show source you have selected.
The "Get current slide name" macro seems to only get an empty name.

Can you show the settings of the slide show source?
 
Top