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
Chris Daum  
#1 Posted : Monday, March 8, 2021 9:25:57 PM(UTC)
Chris Daum

Rank: Advanced Member

Groups: Registered
Joined: 11/20/2020(UTC)
Posts: 74
Man
Germany

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...
Chris Daum  
#2 Posted : Tuesday, March 9, 2021 12:06:34 AM(UTC)
Chris Daum

Rank: Advanced Member

Groups: Registered
Joined: 11/20/2020(UTC)
Posts: 74
Man
Germany

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


NiBTour  
#3 Posted : Tuesday, March 9, 2021 12:20:43 AM(UTC)
NiBTour

Rank: Advanced Member

Groups: Registered
Joined: 3/28/2016(UTC)
Posts: 158
Man
United States
Location: SACRAMENTO

Thanks: 5 times
Was thanked: 18 time(s) in 17 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 Go to Quoted Post
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...


xaver  
#4 Posted : Tuesday, March 9, 2021 12:48:02 AM(UTC)
xaver

Rank: Advanced Member

Groups: Registered
Joined: 11/11/2016(UTC)
Posts: 378
Man
Location: Europe

Thanks: 23 times
Was thanked: 38 time(s) in 32 post(s)
Originally Posted by: Chris Daum Go to Quoted Post
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
Papo  
#5 Posted : Tuesday, March 9, 2021 6:32:43 AM(UTC)
Papo

Rank: Advanced Member

Groups: Registered
Joined: 6/16/2020(UTC)
Posts: 75
Peru

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
Users browsing this topic
Guest (2)
Similar Topics
Lumberjack Scripting once again (General Discussion)
by Chris Daum 4/9/2021 6:44:14 AM(UTC)
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.