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
ArunLongjam  
#1 Posted : Monday, November 14, 2022 9:23:48 PM(UTC)
ArunLongjam

Rank: Member

Groups: Registered
Joined: 8/22/2020(UTC)
Posts: 12
India
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.
doggy  
#2 Posted : Monday, November 14, 2022 10:44:33 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: ArunLongjam Go to Quoted Post
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)

ArunLongjam  
#3 Posted : Tuesday, November 15, 2022 3:29:51 PM(UTC)
ArunLongjam

Rank: Member

Groups: Registered
Joined: 8/22/2020(UTC)
Posts: 12
India
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.
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.