If [Window] and [Website]? #631
-
Hi there, brilliant addon. I was wondering if there is anyway that we could check the website the browser is on? For example, I have a scene for YouTube with my youtube details, I have a scene for Rumble with my rumble details, Twitch with my twitch details etc and so on. All colour co-ordinated etc. It would be nice if I go to youtube in the browser and no matter what sub section of youtube or youtube video I am playing, the youtube obs scene would be on. If I switch to twitch and either stream my own page or another persons, my obs twitch theme scene would come up. Essentially, I need a check that would check "youtube.com/." and "rumble.com/." and "twitch.tv/." The above would be brilliant. Currently, unfortunately I have found that if my Twitch window name is Suit and my YouTube window name is Suit and my Rumble window name is Suit, well, only the first macro 'Suit' match will trigger, and thus if that is for Rumble, then it will show the rumble theme as I browse youtube or twitch. Is there any possible way you could add a check like mentioned about? Even if it is some kind of variation of the GET http option to check what the website origin is? Thank you so much for reading and I do hope it is possible and you get back to me. I understand, this time of year is a busy one, so if I don't hear back beforehand, have a great christmas and a wonderful, safe New Year! Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 22 comments 2 replies
-
Hey,
Just to clarify: If so I cannot really think of a good way to do this, if the window title of the particular browser application is always the same on these different websites. Directly interacting with browsers might prove to be difficult. Alternatively - although admittedly a bit resource intensive for such a simple task - you could try to match certain image patterns using the "Video" condition type to identify each website. |
Beta Was this translation helpful? Give feedback.
-
Hi there, yeah that is correct. Web Browser like Chome Brave Etc. I'll check in to browser extensions to see if it is possible. Image patterns... interesting. I'll look in to that and see if I can pull something off. It is such a shame we can't get a tab title's url. I'll play around with the video image matching you mentioned and see what I can get happening. Thanks for the prompt reply, WarmUpTill. |
Beta Was this translation helpful? Give feedback.
-
So, I have made all the macros an image search now, and it all works (having to wait for it to do so, so not an instant check on click). Which brings me to my next question/suggestion: Any way to register a left click or add an option under the image search options [Perform check on left mouse click] Thanks, WarmUpTill. Appreciate your addon and help. :) Ideally would be great to have something like: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hmm... I even attempted to create my own variable called Medium Watch, which is set to NONE. And in the Twitch Macro it should only check if the variable is NONE and if it does check it should change the variable to TWITCH. And the only running macro would be my MOUSE AREA macro which if in the correct area, should reset the variable to NONE then play each medium Macro in order... So my logic is, the variable is changed by the correct matching medium image obtained and thus shouldn't run on any other medium Macro as it is no longer set to NONE... of course I shouldn't need to add this check as I think there may be a bug as mentioned in the previous comment however, I figured I would attempt to bypass it with my own home made variable, but that did not even work. So... either I'm missing something on how this works, or there is a bug or two I've found. :) |
Beta Was this translation helpful? Give feedback.
-
Hi there. So, I have solution to what you are asking. It seems like you managed to figure everything out with imagesearch etc. I would like to anyway tip you about this other method. Like WarmUpTill said, you will need the help of extensions. We're gonna get help of a chrome plugin called AutoControl. AutoControl is basically an advanced scene switcher, for Chrome. It can read tabs, run scripts and it'll let you automate anything. I'm a big fan of it, and it's a super tool to enable OBS with scene switcher, and Chrome, to basically talk to eachother. In short terms: In AutoControl Then you just duplicate this for twitch and other websites, and use the same txt file. So now, the txt file will be constantly updated depending on which tab you have open. In Advanced Scene Switcher So, now you get the picture :) I believe this to be a quick and easy way to accomplish what you are looking for. Using a txt file is an easy way to establish a connection between OBS and other programs and extensions. |
Beta Was this translation helpful? Give feedback.
-
Hi there nacalai. Thank you for the idea, I'll give it a try but I have a feeling that the same bug will be present that I have found listed above. Thank you very much for your suggestion. Downloading and giving it a try now. :) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Ok, @nacalai I have your browser extension running perfectly, it changes the textfile based on what url is in the tab. Now, @WarmUpTill and @nacalai When I have separate macros for each, the file is loaded in and read, the correct scene is switched, other macros are ignored as per expected (so one could say this is done and fixed and solved) BUT, NO. The bug I found still exists. If I untick all other macros and just use my one 'Mouse Area' macro, the bug remains. Why would I want one Macro to trigger multiple? Cause I only wanted the macros to trigger when I click on a tab, since we don't have 'on mouse click' options in Advanced Scene Switcher, I went with Mouse Cursor movement in a specfic area of the screen. THIS is suppose to make it so the macros are not continously running in the backgound taking up resources, instead, only one is being triggered when the mouse enters an area (or hopefully 'on click' later on). ONCE this is triggered, it should then check each of the Macros I have created and switch screen accordingly. That said, I think the same issue is happening (as mentioned above), it is remembering that the matched value is true and then just bypassing each of the conditions and running the outcome box. The bug only happens if you are using one macro to call multiple macros using a same search/variable/file/value. If I don't use the 'MOUSE AREA' macro, and just tick all of the other macros, all works perfectly, but it is continuousy checking and running in the background, which is what I was attempting to bypass. :) I hope this makes sense. Kind regards, |
Beta Was this translation helpful? Give feedback.
-
Unexpected macro execution:I think what is happening is that you are misunderstanding what the "Run" option of the "Macro" action type does. It is a bug however that paused macros are executed. Mouse click:I implemented the option to check for mouse clicks for Windows. A build with this change should be available here in a few minutes: This might help you to simplify your setup further. |
Beta Was this translation helpful? Give feedback.
-
I understand the 'run macro' button at the top window should run the macro with the conditions applied to it. The same logic in my brain I apply to the 'run' option of the 'macro' option within the bottom window. I just figured it should run the macros in order and not skip any conditions. Seems dumb to skip conditions. Maybe there should be an option 'Run' and 'Skip Conditions/Don't Skip Conditions' ? The mouse click option is going to be helpful, I appreciate that! Thank you! I'll let you know of my progress! Much appreciated. |
Beta Was this translation helpful? Give feedback.
-
@WarmUpTill, still waiting on the update with the Mouse Click option. :) |
Beta Was this translation helpful? Give feedback.
-
@SuitYourself Click on the build, scroll down to artifacts and you'll see the downloads for the build |
Beta Was this translation helpful? Give feedback.
-
Installed and tested. Since I don't understand how to work this run pause unpause macro thing you got going, I can't make one macro which checks all others since all conditions are bypassed when running then. If you got a way to have one macro play multiple in one hit and check all their conditions, then I'd love to know. I can't figure it out. Thanks again :) |
Beta Was this translation helpful? Give feedback.
-
I am not sure I fully understand what you are trying to do. You have a single macro that you want to use as some sort of "master" condition and only if its condition are true should any of the other macros be executed (assuming their conditions are true as well), correct? If so you could simply use a setup like this (the used conditions and actions are just examples here): The macros "Normal macro 1" and "Normal macro 2" can only ever run if "Master macro's" conditions are true also. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
I'll play around with that idea. Thanks again @WarmUpTill :) |
Beta Was this translation helpful? Give feedback.
-
Thought I would try another way, and not sure if I discovered another bug or not. Created two macros: Both are ticked to run. Then Macro unpause YOUTUBE (my youtube macro) And Browser Unfocus macro has the same but unticked the 'and is focused' option and canged 'unpause' to 'pause'. That said, it doesn't seem toggle pause and unpause based on browser focus. |
Beta Was this translation helpful? Give feedback.
-
"BROWSER UNFOCUS" is not the inverse of "BROWSER FOCUS" so both macros will be executed if a process with the name "brave.exe" exists and is focused. What you probably wanted "BROWSER UNFOCUS" to be is "If not ... ". |
Beta Was this translation helpful? Give feedback.
-
Ah I see (sorry for my constant posts from a Noob. If anything, you'll see how the average dumb dumb reads things). I'll set out the [if not] functions in a moment. : ) I hope you don't mind my stupid posts updating you of what I am trying. |
Beta Was this translation helpful? Give feedback.
-
All working brilliantly now mate! Thank you so much for your help @WarmUpTill |
Beta Was this translation helpful? Give feedback.
-
@WarmUpTill Not sure if it is possible, but your 'export/import' option to save our work, any chance it could remember the last saved folder it was in? For me, I save it in my documents/SceneSwitcher/ Every time I click 'export' I have to navigate to the folder location. |
Beta Was this translation helpful? Give feedback.
-
Will do. Thanks again @WarmUpTill and Merry Christmas! |
Beta Was this translation helpful? Give feedback.
All working brilliantly now mate!
I have it so it only need to activate and use the macros when I left click on the browser or back in to my game. <3
Thank you so much for your help @WarmUpTill
What is your paypal for me to throw you a donation mate?