Resource icon

Non-OBS Script Auto Source Switcher

obsfan

New Member
obsfan submitted a new resource:

Auto Source Switcher - An adaptable script using AutoHotKey

A donation alone isn't enough of a gesture of gratitude for this awesome project, so here's my own little way of paying it forward a bit. Hopefully this will help others like me in the minority of (Windows) users who aren't using it exclusively for gaming and want to do television style broadcasting.

If a scene gets focus (user chooses another OBS scene), script sleeps until focus is changed. Includes blocks for a game capture source and DroidCam app to add an old Android phone as one source....

Read more about this resource...
 

johnnystar

New Member
Thank you for your resource. I have created a timer scene switcher.

;VARIABLES
camsNum = 2 ; Number of scenes
nextCam = 1
sleepTime = 180000 ;pause time between switch scene in milliseconds

MsgBox, 4, , Start timer now?
IfMsgBox, No
return
Loop
{
Sleep, %sleepTime%
Control, ChooseString, Scene%nextCam%, ListBox1, ahk_class OBSWindowClass
nextCam := Mod(nextCam, camsNum) + 1
}
 

RyzaJr

New Member
I feel like this might be really useful, but I'm having trouble understanding his description of what it actually does, haha..
 

Tim26

New Member
Thank you for your resource. I have created a timer scene switcher.

;VARIABLES
camsNum = 2 ; Number of scenes
nextCam = 1
sleepTime = 180000 ;pause time between switch scene in milliseconds

MsgBox, 4, , Start timer now?
IfMsgBox, No
return
Loop
{
Sleep, %sleepTime%
Control, ChooseString, Scene%nextCam%, ListBox1, ahk_class OBSWindowClass
nextCam := Mod(nextCam, camsNum) + 1
}


Hello,
this is what i need to switch between my multiple Cams.
Can you or another User please help me to get this Code work?
Wow can i make a Plugin with this, or where must i place this?
Please help, than i can start my Broadcasts.
Thanks.

Best Regads

Tim26
 

Wxeyes27

New Member
Is there an example or (You Tube) video on how to get this script to work? I am in the same boat as juliett, I use OBS to stream (live/real-time) weather data to my YouTube channel. I would like to be able to have scene switching automated.
 

Dukessa

New Member
Very new to this...
I need OBS to automatically switch scenes and/or sources (still not sure about the difference here), depending on mouse focus.
So I have Firefox and Sublime Editor open.
If I click on Firefox and am doing things in it (clicking around... scrolling... selecting things) then focus is on it, then I click on Sublime Editor (from Win bottom bar) and I would like OBS to automatically show Sublime instead... etc.
This script loops automatically though every x time... regardless of focus... right?
Can someone point me in the direct direction?
Thanks :)
 

dodgepong

Administrator
Community Helper
That functionality is built into OBS1. Check out the Scene Switcher in your settings.
 

Ohm Audio

New Member
Thank you for your resource. I have created a timer scene switcher.

;VARIABLES
camsNum = 2 ; Number of scenes
nextCam = 1
sleepTime = 180000 ;pause time between switch scene in milliseconds

MsgBox, 4, , Start timer now?
IfMsgBox, No
return
Loop
{
Sleep, %sleepTime%
Control, ChooseString, Scene%nextCam%, ListBox1, ahk_class OBSWindowClass
nextCam := Mod(nextCam, camsNum) + 1
}
Hey Jonny how might I get this to work for OBS Studio? Regards, Jack
 

Blue64

New Member
This is the meat of the Script it's self, perhaps include a compiled version of the script as an available download here as well? Also, it might help to point out that AutoHotKey Scripts only work on Windows Operating System, including on Windows Formatted Text Files (so a Sorting Script gets all confused on a Unix/Apple Formatted Text File for example). a small sidestep around this is to use a program such as Notepad++ for your Text Files and ensure your EOL (End Of Line) Conversion is set to "Windows" which uses the Extended Find Function's \r\n (Return Line) instead of \r or \n which only one or the other is used in Unix/Apple Files.
 
Top