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
onelifeonesuit  
#1 Posted : Wednesday, November 24, 2021 4:01:31 AM(UTC)
onelifeonesuit

Rank: Member

Groups: Registered
Joined: 11/10/2020(UTC)
Posts: 10
United Kingdom
Location: Glasgow

Thanks: 1 times
Is there an If...Then or If...Else function in Webscript?
I'm trying to write a script that will change Audio sources depending on the value held in each of the Dynamic Values.

Also, does Webscript allow variables to be set and then recalled in order to get around the limitation of 4 Dynamic Values?

Finally, are there any comprehensive guides to Webscript commands and syntax as used within vMix?

Thanks.
doggy  
#2 Posted : Wednesday, November 24, 2021 4:10:11 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: onelifeonesuit Go to Quoted Post
Is there an If...Then or If...Else function in Webscript?
I'm trying to write a script that will change Audio sources depending on the value held in each of the Dynamic Values.

Also, does Webscript allow variables to be set and then recalled in order to get around the limitation of 4 Dynamic Values?

Finally, are there any comprehensive guides to Webscript commands and syntax as used within vMix?

Thanks.


Have you checked https://forums.vmix.com/...86-Scripting-for-Dummies
onelifeonesuit  
#3 Posted : Wednesday, November 24, 2021 5:14:13 PM(UTC)
onelifeonesuit

Rank: Member

Groups: Registered
Joined: 11/10/2020(UTC)
Posts: 10
United Kingdom
Location: Glasgow

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: onelifeonesuit Go to Quoted Post
Is there an If...Then or If...Else function in Webscript?
I'm trying to write a script that will change Audio sources depending on the value held in each of the Dynamic Values.

Also, does Webscript allow variables to be set and then recalled in order to get around the limitation of 4 Dynamic Values?

Finally, are there any comprehensive guides to Webscript commands and syntax as used within vMix?

Thanks.


Have you checked https://forums.vmix.com/...86-Scripting-for-Dummies


Yes. I've been unable to find answers to my questions.
richardgatarski  
#4 Posted : Wednesday, November 24, 2021 5:18:08 PM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,837
Location: Stockholm

Thanks: 144 times
Was thanked: 297 time(s) in 250 post(s)
onelifeonesuit, no webscripting does not offer any of that.
onelifeonesuit  
#5 Posted : Wednesday, November 24, 2021 5:28:01 PM(UTC)
onelifeonesuit

Rank: Member

Groups: Registered
Joined: 11/10/2020(UTC)
Posts: 10
United Kingdom
Location: Glasgow

Thanks: 1 times
Originally Posted by: richardgatarski Go to Quoted Post
onelifeonesuit, no webscripting does not offer any of that.


Ok, thanks Richard. Unfortunately I have no experience of any scripting language so I'll have to look for another solution.
doggy  
#6 Posted : Wednesday, November 24, 2021 6:13:44 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: onelifeonesuit Go to Quoted Post
Originally Posted by: richardgatarski Go to Quoted Post
onelifeonesuit, no webscripting does not offer any of that.


Ok, thanks Richard. Unfortunately I have no experience of any scripting language so I'll have to look for another solution.


Web scripting and vb.net scripting are created in the same location

Webscripting is limited the vMix function
vb.net scripting uses the same function ( slightly differently written but with the same elements ) with the added benefit of vb.net logic like if then else etc

The link given mostly shows vb.net scripting . vMix does not explain how to do that logic ( except for the use of its functions) as there are enough vb.net tutorials online

Code:
'see post #5 in previous given link
'post #11 give a simple idea of its logic in vb.net 



'WEB 
Function=SetText&Input=1&SelectedIndex=0&Value=Some Text

'API
API.Function("SetText",Input:="1",SelectedName:="Headline.Text",Value:="Some Text")

'------------------------------------------------------------ 

'in vb.net one can use if then else (and more) 

dim recording as boolean = true
if recording = true
  API.Function("SetText",Input:="1",SelectedName:="Headline.Text",Value:="Is recording")
else
  API.Function("SetText",Input:="1",SelectedName:="Headline.Text",Value:="Is NOT recording")
end if  


also helpfull

onelifeonesuit  
#7 Posted : Wednesday, November 24, 2021 10:55:37 PM(UTC)
onelifeonesuit

Rank: Member

Groups: Registered
Joined: 11/10/2020(UTC)
Posts: 10
United Kingdom
Location: Glasgow

Thanks: 1 times
Thanks Doggy. I'm in the middle of a live stream just now but I'll have a closer look at your reply later today.
I found Heath's video helpful (and timely) when I watched it yesterday but I would like to see a series that takes scripting from basics for REAL dummies like me to something a bit more advanced with examples of functions and syntax.

Thanks for your help.
doggy  
#8 Posted : Wednesday, November 24, 2021 11:35:13 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: onelifeonesuit Go to Quoted Post
Thanks Doggy. I'm in the middle of a live stream just now but I'll have a closer look at your reply later today.
I found Heath's video helpful (and timely) when I watched it yesterday but I would like to see a series that takes scripting from basics for REAL dummies like me to something a bit more advanced with examples of functions and syntax.

Thanks for your help.


Examples in the scripting for dummies thread are real working examples !
Users browsing this topic
Guest (4)
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.