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
AdiA  
#1 Posted : Tuesday, July 12, 2022 3:02:50 PM(UTC)
AdiA

Rank: Newbie

Groups: Registered
Joined: 7/7/2022(UTC)
Posts: 9
Israel
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


doggy  
#2 Posted : Tuesday, July 12, 2022 4:03:24 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 961 time(s) in 795 post(s)
Originally Posted by: AdiA Go to Quoted Post
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
AdiA  
#3 Posted : Tuesday, July 12, 2022 4:22:36 PM(UTC)
AdiA

Rank: Newbie

Groups: Registered
Joined: 7/7/2022(UTC)
Posts: 9
Israel
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
AdiA  
#4 Posted : Tuesday, July 12, 2022 10:14:25 PM(UTC)
AdiA

Rank: Newbie

Groups: Registered
Joined: 7/7/2022(UTC)
Posts: 9
Israel
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")



doggy  
#5 Posted : Wednesday, July 13, 2022 1:11:01 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,244
Belgium
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)
AdiA  
#6 Posted : Wednesday, July 13, 2022 5:25:27 AM(UTC)
AdiA

Rank: Newbie

Groups: Registered
Joined: 7/7/2022(UTC)
Posts: 9
Israel
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)


'****************************************************




MTB  
#7 Posted : Thursday, July 14, 2022 6:36:09 AM(UTC)
MTB

Rank: Newbie

Groups: Registered
Joined: 10/22/2020(UTC)
Posts: 7
Nepal

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.
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.