Rank: Member
Groups: Registered
Joined: 8/22/2020(UTC) Posts: 12 Location: Manipur
|
Hi Everyone
I created two Functions "SetText" and "SetLayer".
1. API.Function("SetText", Input:=1, SelectedName:="Text1.Text", Value:="name") 2. API.Function("SetLayer", Input:=Colour, Value:="3,HOST.png")
In the first Function, I want the value is directly connect to my DataSource(Excel/CSV.Sheet1,row1,column1). What is the correct syntax of this? I want only in scripts.
In the Second, I want to use If Else Statement. What is the correct syntax below expression.
If.... API.Function("SetLayer", Input:=Colour, Value:="3,HOST.png") Then API.Function("SetText", Input:=1, SelectedName:= "Text1.Text", Value:="Excel/CSV.Sheet1,row1,column1") ElseIf.... API.Function("SetLayer", Input:=Colour, Value:="2,GUEST3.png") Then API.Function("SetText", Input:=1, SelectedName:= "Text1.Text", Value:="Excel/CSV.Sheet1,row2,column2")
End If
I am starting learning vb and vmix scripting. I looked Scripting for dummies but I couldn't fix my problem now. Please write the correct code. Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
Originally Posted by: ArunLongjam Hi Everyone
I created two Functions "SetText" and "SetLayer".
1. API.Function("SetText", Input:=1, SelectedName:="Text1.Text", Value:="name") 2. API.Function("SetLayer", Input:=Colour, Value:="3,HOST.png")
In the first Function, I want the value is directly connect to my DataSource(Excel/CSV.Sheet1,row1,column1). What is the correct syntax of this? I want only in scripts.
In the Second, I want to use If Else Statement. What is the correct syntax below expression.
If.... API.Function("SetLayer", Input:=Colour, Value:="3,HOST.png") Then API.Function("SetText", Input:=1, SelectedName:= "Text1.Text", Value:="Excel/CSV.Sheet1,row1,column1") ElseIf.... API.Function("SetLayer", Input:=Colour, Value:="2,GUEST3.png") Then API.Function("SetText", Input:=1, SelectedName:= "Text1.Text", Value:="Excel/CSV.Sheet1,row2,column2")
End If
I am starting learning vb and vmix scripting. I looked Scripting for dummies but I couldn't fix my problem now. Please write the correct code. Thanks.
You are not creating functions but trying to use existing vMix function within a script you are creating 2. Setlayer : the name of the input has to be in quotes ! Please read up on programming in vb.net (lots of info on the net) and it logic use Also check again the "scripting for dummies "post in this forum (especially the use of the API XML to retrieve statuses and values) An if else statement has to do a comparision like if a = x then something The SetLayer function does an action not give/retrieve a value to compare with One can also NOT retrieve a value to be used in a SET function strait form a vMix datasource (can by pulling the value from the data within a title populated by the datassource)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/22/2020(UTC) Posts: 12 Location: Manipur
|
Thank you. I was expecting the correct code and want to know how can we link the excel data to the "SetText" function. If it is possible, I want the script. For if else statement, I'll check again scripting for dummies. Thanks.
|
|
|
|
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