Rank: Member
Groups: Registered
Joined: 8/8/2019(UTC) Posts: 26 Location: Georgia Was thanked: 2 time(s) in 2 post(s)
|
Is there a way from within a script to find out which input is displayed in the Preview and Output windows? I have a 2 camera system and I could better automate their control if I had that info available.
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,287 Location: Belgium Thanks: 295 times Was thanked: 967 time(s) in 801 post(s)
|
. .
YES.
XML API Check out scripting for dummies post (vb.net scripting)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/8/2019(UTC) Posts: 26 Location: Georgia Was thanked: 2 time(s) in 2 post(s)
|
Thanks doggy.. Here is the code
dim PreviewIn as string 'holds the Input number in the Preview window dim ActiveIn as string 'holds the Input number in the Active window dim PreviewTitle as string 'holds the Title in the Preview window dim ActiveTitle as string 'holds the Title in the Active window
dim xml as string=API.XML() dim x as new system.xml.xmldocument x.loadxml(xml)
ActiveIn= (x.SelectSingleNode("//active").InnerText) PreviewIn= (x.SelectSingleNode("//preview").InnerText) PreviewTitle = (x.SelectSingleNode("//input[@number='"& PreviewIn &"']/@title").Value) ActiveTitle = (x.SelectSingleNode("//input[@number='"& ActiveIn &"']/@title").Value)
console.writeline(PreviewIn) console.writeline(ActiveIn) console.writeline(PreviewTitle) console.writeline(ActiveTitle)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,287 Location: Belgium Thanks: 295 times Was thanked: 967 time(s) in 801 post(s)
|
There you go :-) Why not ad this little tidbit to the scripting for dummies post ? and use the 'choose language for syntax highlighting' for the code Code:and use the 'choose language for syntax highlighting' for the code
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close