Resource icon

Advanced Scene Switcher 1.26.1

Enma

New Member
I'm wondering if it would be at all possible to also add the enable/disable toggle to the conditions/triggers as well.
That'd make creating and troubleshooting macros a lot easier, instead of having to remove and re add triggers whenever you need to test something while meeting only some of the criteria you want.
 

Warmuptill

Active Member
I'm wondering if it would be at all possible to also add the enable/disable toggle to the conditions/triggers as well.
That'd make creating and troubleshooting macros a lot easier, instead of having to remove and re add triggers whenever you need to test something while meeting only some of the criteria you want.
For conditions the "ignore entry" logic type exists, which just skips over that given condition element.
Capture.PNG


And just to mention it - you can also enable visual guides indicating which condition is currently evaluating to "true":
 

Warmuptill

Active Member
In case more users are facing the problem:

Crashes related to the video condition have been reported with the recent 1.23.0 release.
I am aware of the issue and currently looking into it.
I will try to release a fix tomorrow.
 

Enma

New Member
For conditions the "ignore entry" logic type exists, which just skips over that given condition element.
View attachment 96574

And just to mention it - you can also enable visual guides indicating which condition is currently evaluating to "true":
I was aware of the visual guides, but not of the ignore entry thing, dang. Sorry!
Btw that last update was just *chef's kiss*
 

MMedia

New Member
Do you want the macro to override the manual switch? Or do you want a set of scenes that shuffles itself *only* when you're already in that set? Both are possible, and the wrong one will likely be annoying!

The old tabs still exist, if you uncheck the box on the General tab to hide them, but they're not maintained anymore and might even go away at some point. So try to migrate everything to the macros.
Thanks very much! I was able to get it sorted using the Macros. (migration is a good thing)
 

MMedia

New Member
As already mentioned by @AaronD there are multiple ways of achieving this.
Here is an example guide which might help you get started:

If you have any questions do not hesitate to ask! :)
So thrilled that you all took the time to respond. I feel very good about using this plugin with such great support. Thank you!
 

skrrtn

New Member
I'm trying to setup a "simple" script and I cant for the life of me figure this out!! Can someone please help me? Heres what I'm trying to achieve.

Main Scene - Viewed for 30 seconds, then transitions to a Second Scene
Second Scene - Viewed for 30 seconds, then transitions back to Main Scene
Main Scene - Viewed for 30 seconds, then transitions to Third Scene
Third Scene - Viewed for 30 seconds, then transitions back to Main Scene
etc, etc.

So just main - scene 1 - main - scene 2 - main - scene 3, etc. I....have....tried...everything....I dont understand how to achieve this...
 

AaronD

Active Member
I'm trying to setup a "simple" script and I cant for the life of me figure this out!! Can someone please help me? Heres what I'm trying to achieve.

Main Scene - Viewed for 30 seconds, then transitions to a Second Scene
Second Scene - Viewed for 30 seconds, then transitions back to Main Scene
Main Scene - Viewed for 30 seconds, then transitions to Third Scene
Third Scene - Viewed for 30 seconds, then transitions back to Main Scene
etc, etc.

So just main - scene 1 - main - scene 2 - main - scene 3, etc. I....have....tried...everything....I dont understand how to achieve this...
The normal way that I'd do this is:
  • Macro 1:
    • Conditions:
      • Scene 1 for 30 sec
    • Actions:
      • Switch to Scene 2
  • Macro 2:
    • Conditions:
      • Scene 2 for 30 sec
    • Actions:
      • Switch to Scene 3
  • Etc.
But that only allows a single destination for each scene to go to. You want multiple destinations from your main scene. Thinking about expandability without changing the macro, how about this, with a variable called X:
  • From Main:
    • Conditions:
      • Scene Main for 30 sec
    • Actions:
      • X = X + 1
      • Switch to Scene X
  • From Other:
    • Conditions:
      • Scene X for 30 sec
    • Actions:
      • Switch to Scene Main
  • Start:
    • Conditions:
      • <something>
    • Actions:
      • X = 0
      • Run "From Other"
Your scenes need to have a naming convention that matches whatever you decide to have in place of my "Scene X", and then it just runs through all of them that match that sequence of names, no matter how long that sequence is.

@Warmuptill I know you've explained it already, but could there be a wiki entry on how to do that sort of thing with variables? Thanks!
Also, what actually happens when it reaches the end of the sequence? Does there need to be a stop condition? Or does the error handling already keep things sensible? Maybe that error condition could become a macro trigger to close a loop of scenes, or do some other action?

Or, an alternative Start might be:
  • Start:
    • Conditions:
      • NOT From Other for 40 sec (longer than what that macro has)
      • AND NOT From Main for 40 sec (longer than what that macro has)
    • Actions:
      • X = 0
That should automatically reset the counter when you're on any scene that is not involved, for longer than 40 sec total (just something more than what each of those other macros has). Then when you switch to the main scene, it automatically runs on its own from there.

It may seem straightforward to do this with one long macro with Wait actions, and that does give you an arbitrary sequence, but you also can't escape it without stopping the macro. If you switch away manually, it'll still switch to the next in sequence and keep going. My version gives up when you switch out, and if you use the alternative Start, even resets (eventually) when you switch out.
 

Warmuptill

Active Member
I'm trying to setup a "simple" script and I cant for the life of me figure this out!! Can someone please help me? Heres what I'm trying to achieve.

Main Scene - Viewed for 30 seconds, then transitions to a Second Scene
Second Scene - Viewed for 30 seconds, then transitions back to Main Scene
Main Scene - Viewed for 30 seconds, then transitions to Third Scene
Third Scene - Viewed for 30 seconds, then transitions back to Main Scene
etc, etc.

So just main - scene 1 - main - scene 2 - main - scene 3, etc. I....have....tried...everything....I dont understand how to achieve this...
There are multiple ways of achieving this (depends a lot on what you need to decide what the best approach would be):
  • Here is an example how to set this up in a single macro:
    It has the upside of being the most straight forward to set up.
  • The approach outlined by @AaronD (using "current scene is ..." conditions) is of course also valid and has the mentioned upside of being able to easily interrupt the sequence.
    The downside is that you cannot transition from one scene multiple different scenes easily. (So something like A->B->A->C might be tricky to set up)
  • Yet another approach would be to use the "Sequence" action.
    Sequence.PNG

    It has the upside of making it rather easy to remove individual sequence elements at "runtime" by simply pausing the corresponding macro.
  • [...]
Let me know if you need further details!

@Warmuptill I know you've explained it already, but could there be a wiki entry on how to do that sort of thing with variables? Thanks!
An example how to use variables for scene switching exists here:
But I assume you had something specific to the sequence setup in mind.
I might try to add some more wiki entries on the weekend. :)
 
Last edited:

AaronD

Active Member
  • The approach outlined by @AaronD (using "current scene is ..." conditions) is of course also valid and has the mentioned upside of being able to easily interrupt the sequence.
    The downside is that you cannot transition from one scene multiple different scenes easily. (So something like A->B->A->C might be tricky to set up)
My second version does do that. A->B->A->C My main goal there was expandability without modifying, adding, or removing any of the macros, which I don't think any of the other solutions can do. Debug it once, and then it's all in the naming convention for the scenes, as many or as few as you want to have.

  • Yet another approach would be to use the "Sequence" action.
    View attachment 96638
    It has the upside of making it rather easy to remove individual sequence elements at "runtime" by simply pausing the corresponding macro.
I keep forgetting about the Sequence action. Thanks!

An example how to use variables for scene switching exists here:
But I assume you had something specific to the sequence setup in mind.
I might try to add some more wiki entries on the weekend. :)
Bookmarked this time! Thanks again!
 

Destroy666

Member
Is there any way if e.g. a browser source is currently drawing anything = it has any non-transparent pixels? Unfortunately `Source` -> `is showing` is only checking visibility, which is always on. This is basically a notification popup browser source and I'd like to perform some actions once it shows up. I can get around it with sound as I can make it play one, but wondering if without that there's any way.
 

Warmuptill

Active Member
Is there any way if e.g. a browser source is currently drawing anything = it has any non-transparent pixels? Unfortunately `Source` -> `is showing` is only checking visibility, which is always on. This is basically a notification popup browser source and I'd like to perform some actions once it shows up. I can get around it with sound as I can make it play one, but wondering if without that there's any way.
There is not direct check for "non-transparent image is being rendered".
But, depending on what is being displayed, you might be able to use the Video condition's brightness or color matching.
(If source is not "black" do X)
 

Destroy666

Member
There is not direct check for "non-transparent image is being rendered".
But, depending on what is being displayed, you might be able to use the Video condition's brightness or color matching.
(If source is not "black" do X)
What about the "has no output" option? What does that do? I noticed that and thought that "if not has no output" might work, but I can't get both "if" and "if not" to fire with that.
 

Warmuptill

Active Member
What about the "has no output" option? What does that do? I noticed that and thought that "if not has no output" might work, but I can't get both "if" and "if not" to fire with that.
In this case "no output" means that no image is being rendered at all, which is not the same as a transparent image being rendered.
The "has no output" check can be used to detect situations in which a source is in an undesired state (e.g. a game capture source not capturing any game).
 

Sperbus

New Member
I was told to come here for help. What I really want is to use the image slideshow source, but also have captions for said images. The easiest way to do that I think would be to use this plugin, have it change a text box every slide change to... display the file's name as the caption? Is that doable? Any help would be much appreciated, thank you!
 

Destroy666

Member
I was told to come here for help. What I really want is to use the image slideshow source, but also have captions for said images. The easiest way to do that I think would be to use this plugin, have it change a text box every slide change to... display the file's name as the caption? Is that doable? Any help would be much appreciated, thank you!
I believe you can use the Slide Show -> Current slide path is condition for each path, then execute Source -> Set settings for text sources. Not sure if there's a simplier way with the image slideshow source.
 

Warmuptill

Active Member
I was told to come here for help. What I really want is to use the image slideshow source, but also have captions for said images. The easiest way to do that I think would be to use this plugin, have it change a text box every slide change to... display the file's name as the caption? Is that doable? Any help would be much appreciated, thank you!
That should be doable with the following set of macros:
  • A macro which gets the path of the current image being displayed and assigns it to a variable:
    GetPath.PNG

  • A second macro which uses this variable while adjusting the settings of text source:
    SetCaption.PNG
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! :)
 

AaronD

Active 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! :)
Could they be combined into one macro? Slide show conditions, then both actions? Seems like the second will always and exclusively run at the same time anyway, so you might as well.

Unless you want to change the text by some other means also, in which case the separated version as shown would be better. Just change the variable, "somehow", and the text gets updated from it.
 
Top