vMix Forums
»
General
»
General Discussion
»
Replace integer with variable when referencing API
Rank: Member
Groups: Registered
Joined: 11/10/2020(UTC) Posts: 10 Location: Glasgow Thanks: 1 times
|
Hi, I have the following code as part of a Main/Backstage toggle (thanks to my friend, Matt). Code:dim xml as string = API.XML()
dim innum as string = 1
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim StateOf as string = (x.SelectSingleNode("//input[@number='1']/@callVideoSource").Value)
In line 5 is it possible to replace the number 1 with the variable "innum"? I've tried lots of options but my grasp of vb.NET syntax is close to non-existent. Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: onelifeonesuit Hi, I have the following code as part of a Main/Backstage toggle (thanks to my friend, Matt). Code:dim xml as string = API.XML()
dim innum as string = 1
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim StateOf as string = (x.SelectSingleNode("//input[@number='1']/@callVideoSource").Value)
In line 5 is it possible to replace the number 1 with the variable "innum"? I've tried lots of options but my grasp of vb.NET syntax is close to non-existent. Thanks. Ask Matt ? ;-) Quote:I've tried lots of options Google has a lot of info about vb.net , working with strings and variables included Beats throwing something against the wall and see if it sticks ;-) Code:dim StateOf as string = (x.SelectSingleNode("//input[@number='" & innum & "']/@callVideoSource").Value
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/10/2020(UTC) Posts: 10 Location: Glasgow Thanks: 1 times
|
Originally Posted by: doggy Ask Matt ? ;-) Google has a lot of info about vb.net , working with strings and variables included ;-) Code:dim StateOf as string = (x.SelectSingleNode("//input[@number='" & innum & "']/@callVideoSource").Value
Haha. I did ask Matt but he couldn't find the answer anywhere. I'll be sure to pass this onto him. Thanks for your help and quick response. This works a treat.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
|
1 user thanked doggy for this useful post.
|
|
|
vMix Forums
»
General
»
General Discussion
»
Replace integer with variable when referencing API
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