Rank: Advanced Member
Groups: Registered
Joined: 11/20/2020(UTC) Posts: 74 Thanks: 13 times Was thanked: 9 time(s) in 9 post(s)
|
sorry, but your script is a heck of a mess... :-) Originally Posted by: filipe.shakeit You are right! I'm sorry about that.
So, I have a number of inputs designed to acomodate vmixcall inputs. Depending on the session, I use diferent calls so I have a script for each session. Because the script is big, I'll show the example for the first 2 layout inputs.
<code> dim inputn as integer = 24
for n as integer = 24 to 47
dim layer1 as integer = 1
for i as integer = 1 to 10 API.Function("LayerOn",Input:=inputn,Value:=layer1) layer1 = layer1 + 1 next
inputn = inputn + 1 Sleep(200) next <code>
first get some order in your for loops (example) Code:
for inp as Integer = 1 to 3
for lay as Integer = 1 to 3
Api.Function("LayerOn", Input:= inp, Value:=lay)
next
next
will OvrlayOn Input Layer 1 1 2 2 3 3 (and so on depending on the defined Range) Originally Posted by: filipe.shakeit 'next, define vmixcall to each speaker dim moderador as integer = 1 'refer call for the moderator dim oradora as integer = 2 'refer call for the first speaker dim oradorb as integer = 3 'refer call for the second speaker API.Function("SetLayer",Input:="24",Value:="2,"&moderador) API.Function("SetLayer",Input:="25",Value:="2,"&moderador) API.Function("SetLayer",Input:="25",Value:="3,"&oradora) API.Function("SetLayer",Input:="25",Value:="4,"&oradorb) </code> With the code like this I have a syntax error. I guess the missing space between & and variableyou could (example) Code:
Dim mod() as Integer = {1,1,2,3} 'you could arrange as many "numbers" you like, just do more steps as "i"
Dim in() as Integer = {24,25,25,25} 'and keep each array filled with the same "item count"!!
Dim lay() as Integer = {2,2,3,4}
for i as Integer = 0 to 3 '4 steps!
Api.Function("SetLayer", Input:= in(i), Value:=lay(i), mod(i))
next
The current script I use works but I have to go througth each line individualy: <code> API.Function("SetLayer",Input:="24",Value:="2,1") API.Function("SetLayer",Input:="25",Value:="2,1") API.Function("SetLayer",Input:="25",Value:="3,2") API.Function("SetLayer",Input:="25",Value:="4,3") </code> Sorry for the long text. I hope it helps other folks also. Thanks :)
|
1 user thanked Chris Daum for this useful post.
|
|