Rank: Advanced Member
Groups: Registered
Joined: 11/20/2020(UTC) Posts: 74 Thanks: 13 times Was thanked: 9 time(s) in 9 post(s)
|
Thanks to Doggy and others I found out
Code: Dim client as WebRequest = WebRequest.Create("http://192.168.1.22:8088/api/?Function=StartStreaming&Value=0") Dim response As WebResponse = client.GetResponse() response.Close
starts Stream 1 on my Slave Machine
and
Code: Dim client1 as WebRequest = WebRequest.Create("http://192.168.1.22:8088/api/?Function=StartStreaming&Value=0") Dim client2 as WebRequest = WebRequest.Create("http://192.168.1.22:8088/api/?Function=audiobusOn&Value=M&Input=1") Dim response1 As WebResponse = client1.GetResponse() Dim response2 As WebResponse = client2.GetResponse() response1.Close response2.Close
starts Stream and routes Audio Input to master.
Now I am asking myself, does that make sense? Couple of researches didn´t bring up any light so the shown I call it "Lumberjack Script" worked out in the end...
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/20/2020(UTC) Posts: 74 Thanks: 13 times Was thanked: 9 time(s) in 9 post(s)
|
I developed it a bit further but script keeps running after sending two commands and does not execute third command no matter what third command contains...
Code: Dim com1,com2,com3 as WebRequest Dim res1,res2,res3 as WebResponse Com1=WebRequest.Create(“http://192.168.1.22:8088/api/?Function=audioon&input=3") Com2=WebRequest.Create(“http://192.168.1.22:8088/api/?Function=Fade&mix=0") Com3=WebRequest.Create(“http://192.168.1.22:8088/api/?Function=audiobuson&input=3&value=a") Res1=com1.GetResponse() Res2=com2.GetResponse() Res3=com3.GetResponse() Res1.close Res2.close Res3.close
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/28/2016(UTC) Posts: 159 Location: SACRAMENTO Thanks: 5 times Was thanked: 19 time(s) in 18 post(s)
|
wait I'm confused what's special about this? you're simply starting a stream on two systems. am I missing something? what exactly are you doing I'm curious because maybe it's something i'm not getting and want to know :) as for your issue perhaps try changing your DefaultConnectionLimit and don't ever declare variables on the same line as you have especially in an interpreted language. make sure to declare them separately like your other example: dim res1 as WebResponse dim res2 as WebResponse dim res3 as WebResponse etc it's because reading it sucks and in certain languages and compilers, you will have an issue where the As only applies to the last variable. I know VB is a loos binding language but I would start there. I haven't written code in 8 years and my last language was C\C++ with some .NET so don't take my word on it :) Originally Posted by: Chris Daum Thanks to Doggy and others I found out
Code: Dim client as WebRequest = WebRequest.Create("http://192.168.1.22:8088/api/?Function=StartStreaming&Value=0") Dim response As WebResponse = client.GetResponse() response.Close
starts Stream 1 on my Slave Machine
and
Code: Dim client1 as WebRequest = WebRequest.Create("http://192.168.1.22:8088/api/?Function=StartStreaming&Value=0") Dim client2 as WebRequest = WebRequest.Create("http://192.168.1.22:8088/api/?Function=audiobusOn&Value=M&Input=1") Dim response1 As WebResponse = client1.GetResponse() Dim response2 As WebResponse = client2.GetResponse() response1.Close response2.Close
starts Stream and routes Audio Input to master.
Now I am asking myself, does that make sense? Couple of researches didn´t bring up any light so the shown I call it "Lumberjack Script" worked out in the end...
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/11/2016(UTC) Posts: 378 Location: Europe Thanks: 23 times Was thanked: 38 time(s) in 32 post(s)
|
Originally Posted by: Chris Daum I developed it a bit further but script keeps running after sending two commands and does not execute third command no matter what third command contains...
Code: Dim com1,com2,com3 as WebRequest Dim res1,res2,res3 as WebResponse Com1=WebRequest.Create(“http://192.168.1.22:8088/api/?Function=audioon&input=3") Com2=WebRequest.Create(“http://192.168.1.22:8088/api/?Function=Fade&mix=0") Com3=WebRequest.Create(“http://192.168.1.22:8088/api/?Function=audiobuson&input=3&value=a") Res1=com1.GetResponse() Res2=com2.GetResponse() Res3=com3.GetResponse() Res1.close Res2.close Res3.close
some program languages will bring an error if you define com1 and then use Com1
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 6/16/2020(UTC) Posts: 77 Thanks: 8 times Was thanked: 2 time(s) in 2 post(s)
|
if you are going to send several commands I think you should use scriptsdinamics .... translated from google spanish english
|
|
|
|
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