vMix Forums
»
General
»
General Discussion
»
If...Then function in Webscript?
Rank: Member
Groups: Registered
Joined: 11/10/2020(UTC) Posts: 10 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: onelifeonesuit 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
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/10/2020(UTC) Posts: 10 Location: Glasgow Thanks: 1 times
|
Originally Posted by: doggy Originally Posted by: onelifeonesuit 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.
|
|
|
|
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.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/10/2020(UTC) Posts: 10 Location: Glasgow Thanks: 1 times
|
Originally Posted by: richardgatarski 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: onelifeonesuit Originally Posted by: richardgatarski 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
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/10/2020(UTC) Posts: 10 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: onelifeonesuit 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 !
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
If...Then function in Webscript?
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