vMix Forums
»
General
»
3rd Party Software and Development
»
Scripting - determine current active input, if in range do x
Rank: Advanced Member
Groups: Registered
Joined: 5/6/2016(UTC) Posts: 83 Was thanked: 5 time(s) in 5 post(s)
|
I'm almost done with this large project. One last hurdle to get over.
I have the need to do the following via a script:
1) determine current active input (what input is currently selected to the program output) 2) if it is NOT within the range of 20-24, set MultiViewOverlay on an input to a specific number
If anyone is able to whip up a quick script example for that it would really save the day here!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/6/2016(UTC) Posts: 83 Was thanked: 5 time(s) in 5 post(s)
|
$100 via PayPal whoever whips this up first! PM me
** someone has completed this **
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 5/28/2019(UTC) Posts: 5 Thanks: 2 times Was thanked: 1 time(s) in 1 post(s)
|
Would you be willing to share the solution to us the mortals? :)
Thanks in advance!
|
1 user thanked henry_21pc for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/20/2015(UTC) Posts: 493 Location: Copenhagen, Denmark Thanks: 398 times Was thanked: 100 time(s) in 79 post(s)
|
Originally Posted by: henry_21pc Would you be willing to share the solution to us the mortals? :)
Thanks in advance! Perhaps you can use something like this. Code:Dim doc As New XmlDocument()
doc.LoadXml(API.Xml)
Dim root As XmlNode = doc.DocumentElement
' Select the node active input and fetch input number
Dim node As XmlNode = root.SelectSingleNode("/vmix/active")
Dim inputNumber as Integer = node.InnerXml
' Condition - if the current input number is outside of the range 20-24
If inputNumber < 20 Or inputNumber > 24 Then
Console.Writeline("MultiView for input 14 updated - on layer1 put input18")
API.Function("SetMultiViewOverlay",14,"1,18")
Else
Console.WriteLine("Nothing to change")
' API.Function("SetMultiViewOverlay",3,"1,14")
End If
' Console.WriteLine()
|
2 users thanked stigaard for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 5/28/2019(UTC) Posts: 5 Thanks: 2 times Was thanked: 1 time(s) in 1 post(s)
|
That work perfectly, thanks!
|
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
Scripting - determine current active input, if in range do x
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