logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
john30120  
#1 Posted : Friday, April 17, 2020 1:57:57 AM(UTC)
john30120

Rank: Member

Groups: Registered
Joined: 8/8/2019(UTC)
Posts: 26
United States
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
doggy  
#2 Posted : Friday, April 17, 2020 2:05:29 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,287
Belgium
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)
john30120  
#3 Posted : Saturday, April 18, 2020 1:39:42 AM(UTC)
john30120

Rank: Member

Groups: Registered
Joined: 8/8/2019(UTC)
Posts: 26
United States
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)
doggy  
#4 Posted : Saturday, April 18, 2020 1:53:43 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,287
Belgium
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 


Users browsing this topic
Guest
Similar Topics
VB Scripting: CHR(#) not recognized (General Discussion)
by TBacker 3/5/2021 8:29:03 AM(UTC)
VB Scripting Function (General Discussion)
by MatthiasHH 9/22/2020 10:40:39 PM(UTC)
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.