Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Auto Play/Audio with Mix transitionsFor clearly stated reasons Mix transitions do not follow the general input rules of autoplay and audio. In the latest vMix video Tim gives some options using shortcuts and triggers. Here is another option example: There is no check to see if the Mix is in Output, in overlay or part of a multiview or even check on multiple Mix inputs in this script but are easely added if so needed. Am sure you can figure it out how to add ;-) And yes there will be a slight action delay if one uses other transitions than Cut in the Mix (obviously) This an auto variation of https://forums.vmix.com/...ng-for-Dummies#post97309Code:
dim MixNumber as string = "2"
dim oldactive as string = ""
dim Mactive as string = ""
dim Mpreview as string = ""
dim x as new system.xml.xmldocument
do while true
x.loadxml(API.XML())
Mactive = (x.SelectSingleNode("//mix[@number='" & MixNumber & "']/active/text()").InnerText)
Mpreview = (x.SelectSingleNode("//mix[@number='" & MixNumber & "']/preview/text()").InnerText)
if oldactive <> Mactive then
API.Function("Play",Input:=Mactive)
API.Function("AudioOn",Input:=Mactive)
API.Function("Pause",Input:=Mpreview)
API.Function("AudioOff",Input:=Mpreview)
oldactive = Mactive
end if
loop
|
4 users thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/5/2017(UTC) Posts: 37 Location: Zagreb
Thanks: 8 times
|
heyo, got a question: Quote:Dim game As String = "http://127.0.0.1:8088/api/?Function=SetImage&Input=GAMING.gtzip&SelectedName=background1.Source&Value=E:\ZKVI\PNG\GAMING\OBLAST_GAMING_CRVENI.png" Dim webClient As New System.Net.WebClient Dim result1 As String = webClient.DownloadString(game) why do I get an error in Line 3? Script 'TEST' Error Line 3: The remote server returned an error: (500) Internal Server Error.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: gefiltafish heyo, got a question: Quote:Dim game As String = "http://127.0.0.1:8088/api/?Function=SetImage&Input=GAMING.gtzip&SelectedName=background1.Source&Value=E:\ZKVI\PNG\GAMING\OBLAST_GAMING_CRVENI.png" Dim webClient As New System.Net.WebClient Dim result1 As String = webClient.DownloadString(game) why do I get an error in Line 3? Script 'TEST' Error Line 3: The remote server returned an error: (500) Internal Server Error. What are you trying to do ? put the local image in the title ? KISS https://forums.vmix.com/...ng-for-Dummies#post70833
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
A CountDown Alternative- Changing display format over time hh:mm:ss -> mm:ss -> ss - Changing colours at specified times Countdown.png (109kb) downloaded 62 time(s).
|
2 users thanked doggy for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 2/19/2022(UTC) Posts: 3 Location: Lisbon Thanks: 1 times
|
This topic has helped me a lot. Thanks to all who contributed with ideas and code. I'm looking for a way to change a title's headline to a random row on an excel data source. It's a hot chair thing, the person selected goes to the "hot chair" and does it's thing. So far : Code:dim gen as system.random = new system.random()
dim v = gen.Next(1, 100)
dim i = Input.Find("chair.gtzip")
now is the part where i'm stuck. how do i pass v as the third argument of DataSourceSelectRow? Code:API.Function("DataSourceSelectRow",Value:="Excel/CSV,Participant_List/<random>)
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: TFrutuoso Code:dim gen as system.random = new system.random()
dim v = gen.Next(1, 100)
dim i = Input.Find("chair.gtzip")
how do i pass v as the third argument of DataSourceSelectRow? Code:API.Function("DataSourceSelectRow",Value:="Excel/CSV,Participant_List/<random>)
Thanks! string concatenation ! Code:API.Function("DataSourceSelectRow",Value:="Excel/CSV,Participant_List," & CStr(v))
Put in a test though to stay within the limits of your data source row count ;-)
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 9/9/2017(UTC) Posts: 36 Location: Jeffry_Ghost Thanks: 10 times Was thanked: 2 time(s) in 2 post(s)
|
Hello guys, I am still learning in scripting and i find myself in dead end. Is there anyway how to start transition in/out of GT title. I tried " API.Function("TransitionIn",Input:=2)" Only way i can do it is via mouse click in small window as i show in picture. T-transition-in-out.png (10kb) downloaded 2 time(s).I need to do this because i use titles via MULTIVIEW and not via DSK for our produciton. Maybe i just missed something maybe not I would appreciate any advice
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 2/19/2022(UTC) Posts: 3 Location: Lisbon Thanks: 1 times
|
Originally Posted by: doggy string concatenation ! Code:API.Function("DataSourceSelectRow",Value:="Excel/CSV,Participant_List," & CStr(v))
Put in a test though to stay within the limits of your data source row count ;-) Worked like a charm. Really need to get back to my VB roots! Thank you for your help.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 2/19/2022(UTC) Posts: 3 Location: Lisbon Thanks: 1 times
|
Originally Posted by: Jeffry_Ghost Is there anyway how to start transition in/out of GT title. I tried " API.Function("TransitionIn",Input:=2)"
I'm no expert, but let me see if i can help here. Try: Code:Overlay.Find(2).In("Title 0- The Classic Blue.gtzip")
you can also automate the transitions a bit. waits 5 seconds Disables Overlay 2. Give it a try, let us know if it's what you're looking for!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: Jeffry_Ghost Hello guys,
Is there anyway how to start transition in/out of GT title. I tried " API.Function("TransitionIn",Input:=2)"
Code:API.Function("TitleBeginAnimation",Input:=2,Value:="TransitionIn")
Code:API.Function("TitleBeginAnimation",Input:=2,Value:="TransitionOut")
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/31/2017(UTC) Posts: 93 Location: KZ
Thanks: 3 times Was thanked: 10 time(s) in 10 post(s)
|
Hi guys, Is it possible to quickly swap the contents of 2 text fields? I am trying to simplify the scoreboard controls.
Title1 = XXX Title2 = YYY
swap
Title1 = YYY Title2 = XXX
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: andreypetr Hi guys, Is it possible to quickly swap the contents of 2 text fields? I am trying to simplify the scoreboard controls.
Title1 = XXX Title2 = YYY
swap
Title1 = YYY Title2 = XXX Sure. Read the content into varables and put them back switched. There is enough code examples in this post to achieve this. Don't see what is simplifying scoring with this
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/31/2017(UTC) Posts: 93 Location: KZ
Thanks: 3 times Was thanked: 10 time(s) in 10 post(s)
|
After reading the thread and copying tidbits from other solutions I came up with this. Swap 2 text titlesCode:dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim player1 as string = (x.SelectSingleNode("//input[@number=1]/text[2]").InnerText)
console.writeline(player1)
sleep(500)
x.loadxml(xml)
dim player2 as string = (x.SelectSingleNode("//input[@number=1]/text[4]").InnerText)
console.writeline(player2)
sleep(500)
API.Function("SetText",Input:="1",SelectedName:="name-left.Text",Value:=player2)
API.Function("SetText",Input:="1",SelectedName:="name-right.Text",Value:=player1)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/31/2017(UTC) Posts: 93 Location: KZ
Thanks: 3 times Was thanked: 10 time(s) in 10 post(s)
|
Originally Posted by: doggy Sure. Read the content into varables and put them back switched. There is enough code examples in this post to achieve this.
Don't see what is simplifying scoring with this In our event players will be switching sides many times. So you have to quickly rearrange them without manual retyping.
|
1 user thanked andreypetr for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: andreypetr After reading the thread and copying tidbits from other solutions I came up with this. Swap 2 text titlesa little easier to retrieve title content Code:dim player1 = Input.Find("Name").Text("Headline.Text")
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/5/2017(UTC) Posts: 37 Location: Zagreb
Thanks: 8 times
|
Stinger source (path) change thru script? Is it possible? I cannot find any shortcut function that can do it, do you guys have any ideas?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: gefiltafish Stinger source (path) change thru script? Is it possible? I cannot find any shortcut function that can do it, do you guys have any ideas?
There isn't one hence. Guess because 4 stingers isn't enough? One can use this age old alternative for more (without scripting)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/5/2017(UTC) Posts: 37 Location: Zagreb
Thanks: 8 times
|
Originally Posted by: doggy Originally Posted by: gefiltafish Stinger source (path) change thru script? Is it possible? I cannot find any shortcut function that can do it, do you guys have any ideas?
There isn't one hence. Guess because 4 stingers isn't enough? One can use this age old alternative for more (without scripting) well, I have a show that would like to use up to 9 of them, depending on which set of questions is chosen. Thanks for the tip tho, already worked with this alternative :)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,230 Location: Belgium Thanks: 293 times Was thanked: 957 time(s) in 792 post(s)
|
Originally Posted by: gefiltafish
well, I have a show that would like to use up to 9 of them, depending on which set of questions is chosen. Thanks for the tip tho, already worked with this alternative :)
As this is about scripting ... once can script the same proces instead of using trigger and/or use DynaminInput (to keep it simple have your stingers no variation in duration ;-)
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 8/20/2021(UTC) Posts: 17 Location: Cologne Thanks: 2 times Was thanked: 3 time(s) in 2 post(s)
|
Hey everyone, I'm just a patchwork-scripter and I'm currently stuck trying to compare files from a VideoList-Input to files of a specified directory on the computer. The goal is to add all files to the VideoList-Input, that are in this directory - but currently being not part of the VideoList-Input. What I came up with: - create a list-array variable, that's expandable - loop through all "item"-nodes inside the "list"-node of the specified input in "API.XML()" - add all paths (InnerText of each item) to the list-array - loop through all files in specified directory - if a file is not in the list-array, add it to the VideoList-Input I have almost every bit. I can get all items of that VideoList-Input, I can get all files of that directory and add any file to the VideoList-Input. The only bit that's missing is dealing with an expandable list-array. On the official docs.microsoft.com I found this (would be the ideal solution for my approach): Code:Dim salmons As New List(Of String)
salmons.Add("chinook")
salmons.Add("coho")
salmons.Add("pink")
salmons.Add("sockeye")
And lots of people online using the same structure. But I couldn't get it to work in vMix. It always "errors" trying to save the script. Is this even supported in vMix-Scripting? If there is someone able to help me out, that would be insanely awesome. I also would love to know if there is maybe a more elegant solution.
|
|
|
|
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