Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

woodbyte

New Member
I can't replicate some behavior from the old version using the current build. Specifically:

{
"StartMessageDisable": true,
"WindowList": [
{
"value": "(.*),Fullscreen,isFullscreen"
},
{
"value": "Backup Scene Name,Desktop"
}
]
}

I believe the following should work, but once it detects a fullscreen window it won't go to backup scene even if the active window is no longer fullscreen.

DRdUlGq.png
 

KomeijiKuroko

New Member
Hello! I wanna to suggest to add some features.
1.If I use "When no window matches - Switch to", I find that when active window is OBS itself , plugin will still switch to the scene I set. When I click another scene, it change back immediately. Built-in plugin will not do this, as it will pause when OBS is active window and you can change scene manually. I try to add OBS itself to "Ignore Windows", but failed. Could you add an option to pause switcher when OBS itself is active window?

2.I spotted that plugin support Regular Expression in match window title. I try to set up a window titled "\d+" and it fail to match it (plugin catch it when I set rule as "\\d\+" ). I guess title-match is always working as Regular Expression mode. Maybe you can add an option to certain every rule is "title equal match" or "regular expression match", emmm, maybe more it's more clear to intention and user-friendly.
 

Warmuptill

Active Member
I can't replicate some behavior from the old version using the current build. Specifically:

{
"StartMessageDisable": true,
"WindowList": [
{
"value": "(.*),Fullscreen,isFullscreen"
},
{
"value": "Backup Scene Name,Desktop"
}
]
}

I believe the following should work, but once it detects a fullscreen window it won't go to backup scene even if the active window is no longer fullscreen.

DRdUlGq.png
Found the issue, fixing it. Thanks!
Hello! I wanna to suggest to add some features.
1.If I use "When no window matches - Switch to", I find that when active window is OBS itself , plugin will still switch to the scene I set. When I click another scene, it change back immediately. Built-in plugin will not do this, as it will pause when OBS is active window and you can change scene manually. I try to add OBS itself to "Ignore Windows", but failed. Could you add an option to pause switcher when OBS itself is active window?

2.I spotted that plugin support Regular Expression in match window title. I try to set up a window titled "\d+" and it fail to match it (plugin catch it when I set rule as "\\d\+" ). I guess title-match is always working as Regular Expression mode. Maybe you can add an option to certain every rule is "title equal match" or "regular expression match", emmm, maybe more it's more clear to intention and user-friendly.
Regarding your first point:
The built in scene switcher only switches scenes when the active window title changed (lastTitle != title). This is not useful for me however since i need to check other switching conditions (like Screen Region switches and Scene Round Trips) and be ready to switch scenes accordingly and fall back to the backup scene accordingly.
I could however add another tab "Pause Windows" that contains a list of window names that will cause the scene switcher to stop until that window title is no longer in focus (similar to Pause Scenes). Would that work for you?
(Ignore Windows just acts as if the window title did not change. So if the last window title caused the plugin to switch to the backup scene it will still do that on the ignored window)

Regarding your second point:
I cant seem to recreate your problem. I tested it using "\d+.txt - Notepad" as a window name to match the window title "123.txt - Notepad" and i didn't need to add any escape characters. In fact if i did it would no longer match. Can you describe your situation in more detail so i can try to find the issue?
 

KomeijiKuroko

New Member
Found the issue, fixing it. Thanks!

Regarding your first point:
The built in scene switcher only switches scenes when the active window title changed (lastTitle != title). This is not useful for me however since i need to check other switching conditions (like Screen Region switches and Scene Round Trips) and be ready to switch scenes accordingly and fall back to the backup scene accordingly.
I could however add another tab "Pause Windows" that contains a list of window names that will cause the scene switcher to stop until that window title is no longer in focus (similar to Pause Scenes). Would that work for you?
(Ignore Windows just acts as if the window title did not change. So if the last window title caused the plugin to switch to the backup scene it will still do that on the ignored window)

Regarding your second point:
I cant seem to recreate your problem. I tested it using "\d+.txt - Notepad" as a window name to match the window title "123.txt - Notepad" and i didn't need to add any escape characters. In fact if i did it would no longer match. Can you describe your situation in more detail so i can try to find the issue?


Thanks very much!
About first point: Pause Windows may be useful to me! But I spotted the ListBox in the "Ignore Windows" didn't have item of OBS itself. Then I add OBS title and plugin title manually, it will not act as "Ignore Windows". Then I add OBS and plugin title to "General" tab, it still not work.

Here is my steps:
  1. Switch to a new scene set
  2. Add 2 scene, "Scene_A", "Scene_B"
  3. Add OBS and plugin title to "Ignore Windows"; Go to "General" tab, add a rule for a random window C (eg. Chrome, Notepad) to switch to Scene_A, and no-match window goes to Scene_B.
  4. Switch to Window C, you can see scene goes to Scene_A, then you switch to OBS ( not use Alt-Tab, just click, not
    maximize every window). Scene goes to Scene_B ( expect Scene_A)
  5. Test#2: Go to "General" tab, add a rule for OBS to switch to Scene_A. Switch to Window C, scene is Scene_A, OK. Then switch window to OBS, Scene becomes Scene_B ( expect Scene_A )
Although title of OBS is very long, I am sure I type every word correctly( I use GetWindowText Tool and Copy-Paste). Then I try to use Regex in "General" tab for OBS ( OBS.* ) . It can catch every window with prefix "OBS" except OBS itself. And I found that Ignore Windows doesn't support Regex. Maybe whole plugin ignore OBS itself in any case.
Maybe you would consider this problem when developing "Pause Windows"


And second point
:
I am sorry and maybe I got something wrong. I read your source code and found plugin try to "equal match" first and then "Regex match".

I do this and I can't even recreate my problem...Maybe something wrong I did.
  1. Create a html file:
    HTML:
    <html xmlns="http://www.w3.org/1999/xhtml"><head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title> \d+ </title>
    </head>
    
    <body>
        Hello World!
    </body>
    </html>
  2. Open it in Chrome , and add a rule "\d+ - Google Chrome" go to Scene_A
  3. It works! (It didn't work before I post first comment, maybe I forget something.)
According your source https://github.com/WarmUpTill/SceneSwitcher/blob/master/advanced-scene-switcher.cpp , window will be catched in "equal match". I must have done something incorrectly.

But notepad is not good, you can't create a file whose name contains "\", so the title name will not contains "\"

Thank you very much!
 
Last edited:

Warmuptill

Active Member
Warmuptill updated Automatic Scene Switching with a new update entry:

Added hotkey back, added pause windows, fixed bugs/freezes/crashes, removed memory leak

Added hotkey back. (You can find it under settings -> hotkeys -> toggle start/stop advanced scene switcher)
Added pause windows (functions like pause scenes).
Removed a memory leak on opening the settings for the scene switcher.
Fixed ignore windows not catching OBS main window title(also for new pause windows). (Thanks to KomeijiKuroko)
Fixed OBS freeze / crash on close that could occur in rare cases when...

Read the rest of this update entry...
 

KomeijiKuroko

New Member
Thank you very much for your work , it is much better now !

Pause window works very well, with support of catching OBS main window title, but I find one thing, is that pause window and ignore window don't support regex.

I tried to use OBS.* and it failed to catch OBS itself. OBS title is too long, I think, Regex "OBS 0.16.2 (64bit, windows) - Profile: .* - Scenes: .* " might be a common solution for user who changes profile frequently.
 

woodbyte

New Member
I think there's still a small bug left with the Fullscreen function. Take the previously mentioned rule:

[Fullscreen]: (.*) (only if window is fullscreen)

It is being activated by simply focusing on the desktop (explorer.exe, Progman class), unlike all the other system related contexts which appear to be excluded (Shell_TrayWnd, MultitaskingViewFrame, etc.).
 
Last edited:

Jack0r

The Helping Squad
Maybe a stupid idea as I am not sure if the frontend allows it, but would it be possible to select a different transition to use for a switch to scene X or Y ?
So you could set your automatic switch to use a swipe-left for a switch to scene X and a swipe-right for scene Y for example. And probably the default being "use default transition".
 

Warmuptill

Active Member
Maybe a stupid idea as I am not sure if the frontend allows it, but would it be possible to select a different transition to use for a switch to scene X or Y ?
So you could set your automatic switch to use a swipe-left for a switch to scene X and a swipe-right for scene Y for example. And probably the default being "use default transition".

That's a good idea. I will look into it when I find time. Thanks for the suggestion!
 

EposVox

Member
Am I missing something? It won't let me input negative coordinates. But on my 3 monitor setup, the coordinates start going into the negatives...
 

EposVox

Member
Yeah, from what I can tell, if your "Main Monitor" is set to the middle screen, then any left or up-left ones become negative values, since the top-left of your main screen is 0,0

(Also I'm not finding a .ui file to edit)
 
Last edited:

Warmuptill

Active Member
Warmuptill updated Automatic Scene Switching with a new update entry:

Added transitions ,added file support, bug fixes, memory leak fix

You can now specify a transition for the different scene switches. (this might reset your scene switcher settings, sorry if this is the case)

Added the option to use files to control the scene switcher. (you can write the current scene to a file using the scene switcher and read from a file to switch to a scene)

Added support for regular expressions for Pause Windows.

You can now use negative values in Screen Regions. (Let me know if there is any unexpected behavior)

Scene switcher will...

Read the rest of this update entry...
 

Warmuptill

Active Member
Warmuptill updated Automatic Scene Switching with a new update entry:

Added transitions per scene switch

Added the feature suggested by Jack0r:

You can configure a transition for each scene switch. You can set it up under the new tab "Transitions".

Also reordered the tabs.

Read the rest of this update entry...



Let me know if everything is working as expected.

Also, do you think the transition rules specified in the new "Transitions" tab should always have the highest priority to set transitions or should I make an exception for Scene Round Trips, since it is possible to configure a transition for it, too?
 
Last edited:
Top