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
David_in_Philly  
#1 Posted : Friday, December 31, 2021 1:33:01 PM(UTC)
David_in_Philly

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2017(UTC)
Posts: 124
United States
Location: Philadephia, PA

Thanks: 31 times
Was thanked: 13 time(s) in 8 post(s)
I know that this can be done in VB.net, but I don't know how to do it - so I'm hoping that it can be done in WebScripting - or that you can provide a simple example in VB.net script.

I'd like to combine DynamicValue1,DyamicInput2 into a single statement (including the comma) that substitutes the actual values for the two variables - rather than the string "DyamicValue1,DynamicInput" itself. Is there some function that will do that?

Thanks.

-David
doggy  
#2 Posted : Friday, December 31, 2021 6:12:09 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,218
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: David_in_Philly Go to Quoted Post
I know that this can be done in VB.net, but I don't know how to do it - so I'm hoping that it can be done in WebScripting - or that you can provide a simple example in VB.net script.

I'd like to combine DynamicValue1,DyamicInput2 into a single statement (including the comma) that substitutes the actual values for the two variables - rather than the string "DyamicValue1,DynamicInput" itself. Is there some function that will do that?

Thanks.

-David


DynamicInputs and DynamicValues are technically to be used by name directly into functions as separate variables/elements

If one wants their content to be used in a different way , like combine their content, one needs to read them from the API XML to manipulate them to be used in a function or otherwise
David_in_Philly  
#3 Posted : Saturday, January 1, 2022 11:40:21 AM(UTC)
David_in_Philly

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2017(UTC)
Posts: 124
United States
Location: Philadephia, PA

Thanks: 31 times
Was thanked: 13 time(s) in 8 post(s)
Thanks, Doggy.
Will be responding to your email later today.
Kristoph  
#4 Posted : Monday, February 21, 2022 10:05:11 PM(UTC)
Kristoph

Rank: Member

Groups: Registered
Joined: 7/6/2020(UTC)
Posts: 15
United Kingdom

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
Here you go.

Code:


dim Dynamic1Val as String = ""
dim Dynamic2Val as String = ""

dim VmixXML as new system.xml.xmldocument

VmixXML.loadxml(API.XML)

dim Dynamic1Node As XmlNode = VmixXML.selectSingleNode("/vmix/dynamic/value1")
dim Dynamic2Node As XmlNode = VmixXML.selectSingleNode("/vmix/dynamic/value2")

Dynamic1Val = Dynamic1Node.InnerText
Dynamic2Val = Dynamic2Node.InnerText

dim Result As String=Dynamic1Val & "," & Dynamic2Val

console.writeline(Result)

Users browsing this topic
Guest
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.