Rank: Advanced Member
Groups: Registered
Joined: 11/15/2021(UTC) Posts: 72 Thanks: 8 times Was thanked: 9 time(s) in 7 post(s)
|
Thanks doggy and Nikosman, i already do it like this. However, there are more than 15 inputs and instead of addressing 15 inputs via script, I wanted to reduce it to one List Input. So this is my solution: Code:API.Function("Selectindex", Input:="MyList", Value:=2)
API.Function("Play", Input:="MyList")
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/16/2019(UTC) Posts: 346 Thanks: 75 times Was thanked: 22 time(s) in 17 post(s)
|
Hi all, I just can't seem to get my head around how to script within vMix. Is there anyone who can write the following script for me, I'm happy to kindly give a monetary donation to the person who can help.
This is what I need the script to do.
1. Select viewers name and avatar from comments, display within an overlay (overlay already created called - viewersname). 3. Select random video file between 1 to 65. 4. Play video file.
Once the video file has finished playing, then script runs again automatically and just repeats itself but doesn't duplicate viewers name or avatar.
I'm pretty sure this can be done, thanks for any advice or help on this.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/16/2019(UTC) Posts: 346 Thanks: 75 times Was thanked: 22 time(s) in 17 post(s)
|
Originally Posted by: doggy Originally Posted by: Simsyuk Automated Player Script.
Hi all, I hope everyone is well. I'm testing a preset to handle an automated idea but I require someone to help me with some scripting (I'm more than happy to pay) as I haven't got a clue about scripts etc.
I have around 70ish mp4 video files placed within a folder, currently I have to manually select an input number and a viewers name from vMix Social, once the video ends it then plays a small animation to say the next person being selected, after 5 seconds it then plays the next mp4 from the preview section that I've selected from an input - I also select a random persons name from the vMix Social).
What I'm after is a script that will automatically pick a viewers name from vMix Social, display their name, and then pick a different input number (the mp4 file) or mp4 randomly from a folder (but not the same mp4 twice).
I'm pretty sure this is doable.
As I said I'm happy to pay for someone to create a script for me if someone can help. Thanks in advnace.
Sims Probably better to have posted this in a separate post rather then imbedded in a tips and hints post Quote:What I'm after is a script that will automatically pick a viewers name from vMix Social, Do you have an idea on how this could work with no functions related to social selection etc besides manually selecting and approving a post , unless you automate update of a social title? vMix social is a separate app that sends selections to a webpage and consequentially to a title. Want to scrape the info from the webpage ? btw , random does not exclude duplicates OMG I've only just seen this. I'm so sorry doggy and it's been over a year! Any help or ideas on how to randomize the video clips (1 to 65) and place the viewers name and avatar would be great.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: Simsyuk OMG I've only just seen this. I'm so sorry doggy and it's been over a year!
Any help or ideas on how to randomize the video clips (1 to 65) and place the viewers name and avatar would be great.
Stop posting the same subject in different forum thread and avoid confusion , read the reply posted in the other thread you simultaniously posted ! No wonder you forget what you posted before ;-)
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2014(UTC) Posts: 1,837 Location: Stockholm
Thanks: 144 times Was thanked: 297 time(s) in 250 post(s)
|
First of all, thanks doggy for starting this topic and maintaining it in a fab way! Second, thanks to all of you who add code, answer questions, and add tips. I am rather late to this feast, and have something like 40 years between now and when I was a programmer. I have sort of stayed away from vb.net scripting as I knew zil about it. After stumbling around here, in vMix, and googling for a few days I was still stuck on a particular problem. How to check if the Active Input contained a particular layer/overlay. I was almost about to start learning vb.net and xml stuff from scratch. then I saw: Originally Posted by: nikosman88 Hello guys. A great tool for script by dummies or for general vb.net code that we dont know how to do or if possible to do is Chatgpt AI. If we give it, the details it needs, it can do a big piece of our vb.net script. I needed a script that will find if a specific input in vmix exists and if exists to rename it to a random name. The result after telling chatgpt for vmix xml file and some more details is this I thought why not, I have time and was going to check out ChatGPT any way. It took me around one hour of interacting with ChatGPT to arrive at a solution that worked just fine. I began by asking "how do I program a vmix vb.net script to find the active input". The response was interesting, so I refined to "how do I parse vmix xml api response to find a layer in the active input?" After 15 interactions in total I arrived at a working code. Examples of my inputs are: Quote:No, the active node only contain the input's number. You have to use that number to find the input with that number. It is that input's layers I am interested in. and Quote:not quite there yet. There seems to be an issue with overlaynode and layernodes. A typical inputNode contains: <input key="4e1f2e58-2ca6-4c22-8616-5c36e0b7d6e2" number="2" type="Colour" title="PPT" shortTitle="PPT" state="Paused" position="0" duration="0" loop="False"> PPT <overlay index="0" key="601d300d-7727-436e-8940-5ce2b8eacb64"/> <overlay index="5" key="7643dac4-6954-4e07-adc5-bb8e68ccfe3e"/> </input> I need to check the key in the overlay nodes of that node
Here it is, somewhat cleaned up and de-contextualized: Code: dim x As New XmlDocument()
x.LoadXml(API.XML)
dim InputName as String = "A-special-layer-input"
dim activeContainsTheLayer as boolean = False
dim InputKey as string = (x.SelectSingleNode("//input[@title='"& InputName &"']/@key").Value)
dim activeNode As XmlNode = x.SelectSingleNode("/vmix/active")
dim inputNode As XmlNode = x.SelectSingleNode("/vmix/inputs/input[@number='" & activeNode.InnerText & "']")
dim overlayNodes As XmlNodeList = inputNode.SelectNodes("overlay")
For Each overlayNode As XmlNode In overlayNodes
If overlayNode.Attributes("key").Value = InputKey Then
activeContainsTheLayer = True
Exit For ' Exit the loop after the first match is found
End If
Next
|
2 users thanked richardgatarski for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: nikosman88 Yes if you have patience you can do a lot things but even then you need some knowledge to do the things right. For now my project is this https://forums.vmix.com/...ler---vMixScheduler-Forki downloaded the source code from vscheduler github and im working on it. With many experiments i managed to fix some things except the way i must do vscheduler to recognize list (videolist basically) that exist in vmix. Also my english are bad so some things i told him in Greek language and it understands ok, But Chatgpt cannot find me a working solution so i kindly ask if someone can point me out how to do this. The program is written in c# 7.3 and after i opened in visualstudio i understand that the code below is responsible for recognise the type of vmix event. Yes i know it is not vb.net but if anyone can help me please to fix the problem.. With this code and also added in vcontroler i managed to make vmanager to recognise a new event called Videolist in which i can select the name of the videolist. I see in vmix api xml when we have a list with videofiles it says in the Type="Videolist" so i used this name. With this code vcontroler adds a new event in the type as Videolist but when this event loads in vmix it doesnt run a list but adds a new input list that called list. If anyone knows to point me how to work, please help. Here https://www.dropbox.com/...cheduler%202023.zip?dl=0 is the code for visualstudio 2019 if someone can help. Thank you Really? You dont think this would be more appropriate in a separate post instead of here or better yet in the post you are refering to? This is beyond the scope of this post's subject
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 503 Location: athens Thanks: 122 times Was thanked: 71 time(s) in 67 post(s)
|
Originally Posted by: doggy Originally Posted by: nikosman88 Yes if you have patience you can do a lot things but even then you need some knowledge to do the things right. For now my project is this https://forums.vmix.com/...ler---vMixScheduler-Forki downloaded the source code from vscheduler github and im working on it. With many experiments i managed to fix some things except the way i must do vscheduler to recognize list (videolist basically) that exist in vmix. Also my english are bad so some things i told him in Greek language and it understands ok, But Chatgpt cannot find me a working solution so i kindly ask if someone can point me out how to do this. The program is written in c# 7.3 and after i opened in visualstudio i understand that the code below is responsible for recognise the type of vmix event. Yes i know it is not vb.net but if anyone can help me please to fix the problem.. With this code and also added in vcontroler i managed to make vmanager to recognise a new event called Videolist in which i can select the name of the videolist. I see in vmix api xml when we have a list with videofiles it says in the Type="Videolist" so i used this name. With this code vcontroler adds a new event in the type as Videolist but when this event loads in vmix it doesnt run a list but adds a new input list that called list. If anyone knows to point me how to work, please help. Here https://www.dropbox.com/...cheduler%202023.zip?dl=0 is the code for visualstudio 2019 if someone can help. Thank you Really? You dont think this would be more appropriate in a separate post instead of here or better yet in the post you are refering to? This is beyond the scope of this post's subject yes you are right. i deleted the post
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/1/2013(UTC) Posts: 195 Location: Bovalino (Italy) Thanks: 86 times Was thanked: 3 time(s) in 3 post(s)
|
Good evening, I'm a "very dummy":-( . Can you show me a script to set a certain input to MIX2 as output?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: STADIORADIO Good evening, I'm a "very dummy":-( . Can you show me a script to set a certain input to MIX2 as output?
top left of forum page search keyword "activeinput mix" result #3 and 4: https://forums.vmix.com/...-and-Outputs-with-scriptAlso post #23 of this "dummies" post ;-)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/15/2022(UTC) Posts: 11 Location: Minnsota
|
I am certainly a scripting "dummy." I know how to achieve similar things in spreadsheets (=SUBSTITUTE) but I cannot seem to figure out how to substitute title text in vMix. I am sure it can be done easily through a script, but after scouring for a few days I am still lost. Any help is MUCH appreciated!
I have an XML data source that sends baseball "outs" (0, 1, 2). I need to make substitutions for the graphic to function properly (1=l, 2=ll). I need this to happened automatically.
Title=scorebug.gtzip Value=outs.text
Need value returned for outs (0, 1, 2) to auto change to (1=l, 2=ll)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: ckshofner I am certainly a scripting "dummy." I know how to achieve similar things in spreadsheets (=SUBSTITUTE) but I cannot seem to figure out how to substitute title text in vMix. I am sure it can be done easily through a script, but after scouring for a few days I am still lost. Any help is MUCH appreciated!
I have an XML data source that sends baseball "outs" (0, 1, 2). I need to make substitutions for the graphic to function properly (1=l, 2=ll). I need this to happened automatically.
Title=scorebug.gtzip Value=outs.text
Need value returned for outs (0, 1, 2) to auto change to (1=l, 2=ll)
Reading prior posts in this thread would help , even if example is not exactly what what you are after the ideas can be useful in a adapted way https://forums.vmix.com/...ng-for-Dummies#post80860Not every *.text needs to be visible and can be used as a changing variable fed by your xml to get a result to another *.text field (see example linked to ) Simplest form of scripting here is to convert the original 1,2,3 with a "if then else" processing (vb.net coding) sending it to the visible text field
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/15/2022(UTC) Posts: 11 Location: Minnsota
|
Thanks, doggy!
I have been looking through a lot of examples and trying to adapt for my need.
When Outs.Text reads "2" I and trying to make Outs2.Text visible (invisible otherwise)
Currently trying (unsuccessful):
do while True if Input.Find("scorebugv3.gtzip").Text("Outs.Text") = "2" then API.Function("SetTextVisibleOn", Input:="scorebugv3.gtzip", SelectedName:="Outs2.Text") else API.Function("SetTextVisibleOff", Input:="scorebugv3.gtzip", SelectedName:="Outs2.Text") end if sleep(500) Loop
Ideas where I am going wrong?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: ckshofner Thanks, doggy!
I have been looking through a lot of examples and trying to adapt for my need.
When Outs.Text reads "2" I and trying to make Outs2.Text visible (invisible otherwise)
Currently trying (unsuccessful):
do while True if Input.Find("scorebugv3.gtzip").Text("Outs.Text") = "2" then API.Function("SetTextVisibleOn", Input:="scorebugv3.gtzip", SelectedName:="Outs2.Text") else API.Function("SetTextVisibleOff", Input:="scorebugv3.gtzip", SelectedName:="Outs2.Text") end if sleep(500) Loop
Ideas where I am going wrong? Nothing is wrong with the script except for the fact that it doesn't match your original question/need (replace value instead of hide/unhide) maybe explain unsuccesful
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/23/2019(UTC) Posts: 555
Thanks: 62 times Was thanked: 130 time(s) in 118 post(s)
|
In the 2nd post of this thread, doggy collected a list of links. The 3rd link refers to a different sport but otherwise describes exactly what you want to do.
To quote one of the famous players of your sport: "You can observe a lot just by watching!" ;-)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/15/2022(UTC) Posts: 11 Location: Minnsota
|
Ah! As stated, I am a "dummy." Thank you, thank you, thank you to doggy and dmwkr! Solved!
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/15/2022(UTC) Posts: 11 Location: Minnsota
|
I am having trouble getting a text field to stay connected with the appropriate XML data source column. Thinking a script might solve this.
This is for a baseball graphic. When a runner is on first, XML creates a “first” column with the player’s name. When the base is empty there is no XML data/no column. I have matched the text field name with the column heading name, but this column does not initially exist when a game begins. It only appears when someone is on base, so I am relying on auto column to grab it. It inevitably ends up auto connecting to the wrong data column (i.e. inning). I need this column to be properly mapped to the text field prior to the game beginning, appear when there is data and be blank or off when the column does not exist.
Script idea: Wondering if it is possible to use an XML column as an input then tell the text field to be on if the column exists (true?) or off if the column does not exist (false?). I can’t seem to figure out how I would have the script start looking for the XML column as the input. Any hints would be much appreciated. Also, if you see an obvious better work around/adaptation please share. Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: ckshofner Also, if you see an obvious better work around/adaptation please share. Thanks!
Don't look for a script but instead fix the datasource , make sure the columns is always available filled with blank data if needed
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/15/2022(UTC) Posts: 11 Location: Minnsota
|
Thanks for the reply doggy. Just to clarify. Do you mean that this should be corrected with the XML code being generated that I am receiving rather than something within vMix? I don't have any control over the XML coming in. I just receive the XML link, perhaps this is a request that can be made to the provider?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: ckshofner Thanks for the reply doggy. Just to clarify. Do you mean that this should be corrected with the XML code being generated that I am receiving rather than something within vMix? I don't have any control over the XML coming in. I just receive the XML link, perhaps this is a request that can be made to the provider? Best bet is to request the provider to do some changes otherwise a conversion (script/app) to another usable xml could be done but thats way more work to do to check the xml if a column needs to be added and save
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/21/2020(UTC) Posts: 3 Location: Trier Thanks: 2 times
|
Hey, the last weeks i Looked for a Recording automation but im not realy good in scripting and found not the solution there i looked for. Maybe you could help me?
Step 1 Check a Input with 2 Text cherakters. Name.Text Step 2 Write this Characters down in my Recorder Pathfile with a Seperator between thes Names Step 3 Start the Recording Step 4 if the datasource of the Character from Step 1 Changed and the Recording is Stoped Start by Step1
Is this Possible?
Thanks for the Help
Regards Philipp
|
|
|
|
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