vMix Forums
»
General
»
General Discussion
»
Stupid Question - Web Scripting - How do you address a remote PC?
Rank: Advanced Member
Groups: Registered
Joined: 8/2/2013(UTC) Posts: 1,072 Location: Fairhope, Alabama USA Thanks: 553 times Was thanked: 200 time(s) in 166 post(s)
|
I am using the vMix Script Builder from our friends at Studio 793 to build some simple Web Scripts for a project. But I cannot figure out how to address a 2nd PC with a Web Script. Do you know?
TIA!
- Tom
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/2/2013(UTC) Posts: 1,072 Location: Fairhope, Alabama USA Thanks: 553 times Was thanked: 200 time(s) in 166 post(s)
|
Originally Posted by: doggy Thanks, but not sure what I'm looking for in the forum thread. - Tom
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/16/2017(UTC) Posts: 125 Thanks: 25 times Was thanked: 25 time(s) in 18 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: sinc747 Originally Posted by: doggy Thanks, but not sure what I'm looking for in the forum thread. - Tom This Part Tom Code:'HTTP
Dim client = WebRequest.Create("http://127.0.0.1:8088/api/?Function=SetText&Input=Title 0- The Classic Blue.gtzip&SelectedName=Headline.Text&Value=Some Text")
Dim response = client.GetResponse()
response.Close
replace IP to 2nd pc's
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/2/2013(UTC) Posts: 1,072 Location: Fairhope, Alabama USA Thanks: 553 times Was thanked: 200 time(s) in 166 post(s)
|
Thanks Rudy & Doggy! That's what I needed.
Now... how can I add a 2nd command to the same script.
So far I have
Dim client = WebRequest.Create("http://192.168.1.25:8088/api/?Function=VideoCallAudioSource&Input=Call 2349873452&Value=BusG") Dim response = client.GetResponse() response.Close
I want to add a 2nd command to the same PC... Function = VideoCallVideoSource Input = Call 2349873452 Value = Output2
What is the syntax for a 2nd command in the same script?
Again, thank you!
- Tom
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: sinc747 Now... how can I add a 2nd command to the same script.
Guess something like this might work Code:Dim client as WebRequest = WebRequest.Create("http://127.0.0.1:8088/api/?Function=SetText&Input=Title 0- The Classic Blue.gtzip&SelectedName=Headline.Text&Value=Some Text")
Dim response As WebResponse = client.GetResponse()
sleep(1000)
client = WebRequest.Create("http://127.0.0.1:8088/api/?Function=SetText&Input=Title 0- The Classic Blue.gtzip&SelectedName=Headline.Text&Value=other Text")
response = client.GetResponse()
response.Close
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 303 Thanks: 17 times Was thanked: 79 time(s) in 60 post(s)
|
I was getting errors, not closing the connection after every command. I would suggest to close the connection after every webrequest. I also believe that you can send a second command faster than waiting a second. Try it out. Code:Dim client as WebRequest = WebRequest.Create("http://127.0.0.1:8088/api/?Function=SetText&Input=Title 0- The Classic Blue.gtzip&SelectedName=Headline.Text&Value=Some Text")
Dim response As WebResponse = client.GetResponse()
response.Close
sleep(1000)
client = WebRequest.Create("http://127.0.0.1:8088/api/?Function=SetText&Input=Title 0- The Classic Blue.gtzip&SelectedName=Headline.Text&Value=other Text")
response = client.GetResponse()
response.Close
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: Peter1000 I was getting errors, not closing the connection after every command. I would suggest to close the connection after every webrequest. I also believe that you can send a second command faster than waiting a second. Try it out.
The sleep time was just a way for the example (setting a text in a title ) for the change to be visible when running the script ! FYI: i was not getting an error omitting the first close , but it of course never hurts
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/2/2013(UTC) Posts: 1,072 Location: Fairhope, Alabama USA Thanks: 553 times Was thanked: 200 time(s) in 166 post(s)
|
Awesome Baby!
Thank you.
- Tom
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Stupid Question - Web Scripting - How do you address a remote PC?
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