logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

26 Pages«<1819202122>»
Options
Go to last post Go to first unread
Salvatore  
#381 Posted : Wednesday, March 29, 2023 11:27:37 PM(UTC)
Salvatore

Rank: Advanced Member

Groups: Registered
Joined: 11/15/2021(UTC)
Posts: 62
Italy

Thanks: 7 times
Was thanked: 8 time(s) in 6 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
Simsyuk  
#382 Posted : Saturday, April 1, 2023 5:46:17 AM(UTC)
Simsyuk

Rank: Advanced Member

Groups: Registered
Joined: 8/16/2019(UTC)
Posts: 337
United Kingdom

Thanks: 70 times
Was thanked: 21 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.
Simsyuk  
#383 Posted : Saturday, April 1, 2023 7:59:41 PM(UTC)
Simsyuk

Rank: Advanced Member

Groups: Registered
Joined: 8/16/2019(UTC)
Posts: 337
United Kingdom

Thanks: 70 times
Was thanked: 21 time(s) in 17 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Simsyuk Go to Quoted Post
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.
doggy  
#384 Posted : Saturday, April 1, 2023 10:03:58 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: Simsyuk Go to Quoted Post

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 ;-)
thanks 1 user thanked doggy for this useful post.
Simsyuk on 4/3/2023(UTC)
richardgatarski  
#385 Posted : Thursday, April 6, 2023 11:48:19 PM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,811
Location: Stockholm

Thanks: 137 times
Was thanked: 292 time(s) in 246 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 Go to Quoted Post
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
thanks 2 users thanked richardgatarski for this useful post.
doggy on 4/7/2023(UTC), nikosman88 on 4/7/2023(UTC)
doggy  
#386 Posted : Friday, April 7, 2023 4:30:03 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: nikosman88 Go to Quoted Post
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-Fork
i 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
nikosman88  
#387 Posted : Friday, April 7, 2023 10:48:31 PM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 340
Greece
Location: athens

Thanks: 113 times
Was thanked: 52 time(s) in 49 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: nikosman88 Go to Quoted Post
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-Fork
i 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
STADIORADIO  
#388 Posted : Sunday, April 9, 2023 1:39:56 AM(UTC)
STADIORADIO

Rank: Advanced Member

Groups: Registered
Joined: 10/1/2013(UTC)
Posts: 193
Man
Location: Bovalino (Italy)

Thanks: 83 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?
doggy  
#389 Posted : Sunday, April 9, 2023 3:08:58 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: STADIORADIO Go to Quoted Post

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-script

Also post #23 of this "dummies" post ;-)
ckshofner  
#390 Posted : Friday, April 14, 2023 6:57:37 AM(UTC)
ckshofner

Rank: Member

Groups: Registered
Joined: 12/15/2022(UTC)
Posts: 11
United States
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)

doggy  
#391 Posted : Friday, April 14, 2023 7:44:11 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: ckshofner Go to Quoted Post
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#post80860

Not 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
ckshofner  
#392 Posted : Saturday, April 15, 2023 10:18:33 AM(UTC)
ckshofner

Rank: Member

Groups: Registered
Joined: 12/15/2022(UTC)
Posts: 11
United States
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?
doggy  
#393 Posted : Saturday, April 15, 2023 4:14:49 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: ckshofner Go to Quoted Post
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
dmwkr  
#394 Posted : Saturday, April 15, 2023 5:19:13 PM(UTC)
dmwkr

Rank: Advanced Member

Groups: Registered
Joined: 2/23/2019(UTC)
Posts: 509

Thanks: 62 times
Was thanked: 118 time(s) in 107 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!" ;-)
ckshofner  
#395 Posted : Saturday, April 15, 2023 11:30:49 PM(UTC)
ckshofner

Rank: Member

Groups: Registered
Joined: 12/15/2022(UTC)
Posts: 11
United States
Location: Minnsota

Ah! As stated, I am a "dummy." Thank you, thank you, thank you to doggy and dmwkr! Solved!
ckshofner  
#396 Posted : Thursday, May 4, 2023 12:27:17 AM(UTC)
ckshofner

Rank: Member

Groups: Registered
Joined: 12/15/2022(UTC)
Posts: 11
United States
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!
doggy  
#397 Posted : Thursday, May 4, 2023 12:41:39 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: ckshofner Go to Quoted Post
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
ckshofner  
#398 Posted : Thursday, May 4, 2023 1:05:21 AM(UTC)
ckshofner

Rank: Member

Groups: Registered
Joined: 12/15/2022(UTC)
Posts: 11
United States
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?
doggy  
#399 Posted : Thursday, May 4, 2023 1:33:31 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: ckshofner Go to Quoted Post
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
quarantechno  
#400 Posted : Thursday, May 4, 2023 11:23:38 PM(UTC)
quarantechno

Rank: Newbie

Groups: Registered
Joined: 8/21/2020(UTC)
Posts: 3
Germany
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
Users browsing this topic
26 Pages«<1819202122>»
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.