vMix Forums
»
General
»
General Discussion
»
vb.net scripting - first layer of input to preview
Rank: Newbie
Groups: Registered
Joined: 7/7/2022(UTC) Posts: 9 Location: Israel
|
Hi all...:) I wonder if someone can hep my to write a VB.net code: My goal is to be able to recognize the first layer in an input (from 10) and send it to preview.
Thanks in advance Adi
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,244 Location: Belgium Thanks: 294 times Was thanked: 961 time(s) in 795 post(s)
|
Originally Posted by: AdiA Hi all...:) I wonder if someone can hep my to write a VB.net code: My goal is to be able to recognize the first layer in an input (from 10) and send it to preview.
Thanks in advance Adi
Based on your previous posts you don't want help but for someone to write you one ! (still waiting for the few beers worth ;-) ) All necessarily info to achieve this can be found in the previous post allready mentiond scripting for dummies post combined with Google search on vb.net programming. Hint: check the API XML to find which input is on layer with index 0 of the particualr Input . Perform the PreviewInput function with the found Input key
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/7/2022(UTC) Posts: 9 Location: Israel
|
Hi Doggy Sorry doggy but this inaccurate.
I try to learn and write on my own when my level of ability is basic And I'm progressing and seeing improvement. When I get stuck on something I look for an answer in the forum. (And yes, hoping someone will help me write the code) When you give me a piece of code I try to understand it and incorporate it into my project. And this is my way of learning and advancing in the subject (in addition to tutorials).
If you can, I'll be happy for you to help me with this as well. Thank you
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/7/2022(UTC) Posts: 9 Location: Israel
|
I realy work hard to understed it...:) I tried something like that and with no success
dim xml as string = API.XML() dim Overlay_1 as string = "" dim activeinput as string = "" dim x as new system.xml.xmldocument dim PROGInputNodeList As XMLNodeList x.loadxml(xml)
activeinput = (x.SelectSingleNode("//active").InnerText) Overlay_1 = (x.SelectSingleNode("//input[@number='"& activeinput &"']/overlay[1]/@key").value)
sleep (1000) API.Function("PreviewInput",Input:="Overlay_1")
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,244 Location: Belgium Thanks: 294 times Was thanked: 961 time(s) in 795 post(s)
|
Is a good idea to check the items/naming in the API XML an learn about XPATH to retrieve data from the XML file
The difference between a string and a variable that contains a string to be used in a function is also important
but you are almost there (very close)
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/7/2022(UTC) Posts: 9 Location: Israel
|
Thank Doggy.. These were good hints it works
'******* Now you owe me a few beers....:)**************
dim xml as string = API.XML() dim InputActiveName as string = "" dim OverlayKey as string = "" dim activeinput as string = ""
dim x as new system.xml.xmldocument x.loadxml(xml)
activeinput = (x.SelectSingleNode("//active").InnerText) InputActiveName = (x.SelectSingleNode("//vmix/inputs/input[@number='"& activeinput &"']/overlay/@key").Value)
API.Function("PreviewInput",Input:=InputActiveName)
'****************************************************
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 10/22/2020(UTC) Posts: 7 Thanks: 3 times Was thanked: 1 time(s) in 1 post(s)
|
Hey doggy,
About those beers? Which do you even like? Pretty sure I had some answers spoon-fed to me as well by some old topics by now I reckon.
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
vb.net scripting - first layer of input to preview
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