logo

Live Production Software Forums


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

Notification

Icon
Error

26 Pages«<1011121314>»
Options
Go to last post Go to first unread
doggy  
#221 Posted : Saturday, March 12, 2022 12:20:17 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Jaa_Han Go to Quoted Post

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?



Check the note on the page where you got the example from

Code:
Dim salmons As New System.Collections.Generic.List(Of String)

thanks 1 user thanked doggy for this useful post.
Jaa_Han on 3/12/2022(UTC)
GERDAN4  
#222 Posted : Monday, March 14, 2022 3:38:11 PM(UTC)
GERDAN4

Rank: Newbie

Groups: Registered
Joined: 2/16/2019(UTC)
Posts: 4
Argentina

Hello, first of all, sorry for my English; I write from Argentina and languages ​​are not my forte. I hope you can understand me.
I write for the following:

Is there a way to turn on an overlay when a title contains a specific word, and when the same title contains another specific word, the overlay turns off?

I have this scenario:

-A preset with three inputs (there may be more, but they are irrelevant):

*A NDI screen capture.
*A video (whose input is named "Artistic")
*A XAML or Gtzip title (AnimatedHD.xaml, let's say).

-The title is fed by a Data Source that collects a .txt file generated by a radio automator. This software overwrites the content of the text file as it plays materials (audio or video) randomly. That is, it is not possible to know when a certain material will be executed.

-The automator takes files from a database integrated by audios and videos. Some videos and audios will contain, in their titles, two specific words that do not exist, I suppose, in any known language or dialect and, therefore, unrepeatable: "pfazerexyw" and "rwerxvb" (some audios will contain one of the "words" and some videos the remaining).

Being more clear, the format of the titles will be this:

The Beattles - Yesterday - pfazerexyw.wav
Led Zeppelin - Stairway to Heaven - pfazerexyw.wav
or
Bad Religion -Suffer - rwerxvb.mp4
Millencolin - Not Your Savior - rwerxvb.mp4

What I want to achieve is that when the "Headline.Text" line of the AnimatedHD.xaml title contains the word "pfazerexyw", the video named "Artistic" is activated in overlay 3, and when it contains the word "rwerxvb" the overlay 3 turns off. In this way, when the radio automator plays audio-only files, in vMix an animated video will be activated in overlay and, when the automator plays .mp4 files, the overlay will be turned off, leaving visible the NDI capture (corresponding to the automator's video player). In both cases, in case it is not clear, by the inclusion of a specific word in the XAML or Gtzip title text.

I've done an extensive search in the forum and vb.net sites over the last four weeks, but haven't found anything to guide me; bah, honestly, I have understood less than a quarter of the things. I am not a programmer, but a 2D animator who collaborates with a community radio.

Maybe this is easy for those who have coding knowledge and I will appreciate if you can help me. If not, we will discard the idea due to lack of expertise.

Regards.


PS: I apologize again. This time for the extension of the text.
PS 2: Apologies also if this is not the place for this query.
doggy  
#223 Posted : Monday, March 14, 2022 4:46:06 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: GERDAN4 Go to Quoted Post

Is there a way to turn on an overlay when a title contains a specific word, and when the same title contains another specific word, the overlay turns off?


Same principle https://forums.vmix.com/...3findunread-GT-auto-hide
GERDAN4  
#224 Posted : Monday, March 14, 2022 5:51:01 PM(UTC)
GERDAN4

Rank: Newbie

Groups: Registered
Joined: 2/16/2019(UTC)
Posts: 4
Argentina

Hello, Doggy, thank you very much for the quick response and, above all, for taking the time to do it so early there in Belgium.

I solved it a moment ago and I came to say it.

I had seen the post you mention and couldn't get it to work in my case (I should have written it in my previous post as well).

The resolution was pretty stupid. I needed to place a "contains". Being that way:

Quote:

if Input.Find("AnimatedHD.xaml").Text("Headline.Text").contains("pfazerexyw")

if Input.Find("AnimatedHD.xaml").Text("Headline.Text").contains("rwerxvb")


I repeat: thank you very much for your help.
Noaksey  
#225 Posted : Friday, March 25, 2022 8:24:38 PM(UTC)
Noaksey

Rank: Newbie

Groups: Registered
Joined: 3/16/2022(UTC)
Posts: 3
United Kingdom
Location: Lincolnshire

I've currently adopted the below to show Streaming status. Please can someone advise how I can reference the individual Streams ie channel1, channel2, channel3



Originally Posted by: doggy Go to Quoted Post
Not limited for checking recording status ;-)

Code:
' Checking recording status from the API xml (127.0.0.1:8088/API)
' and display in a Title Input 

dim isrecording as string = ""

'lets keep checking
do while true

   dim xml as string = API.XML()
   dim x as new system.xml.xmldocument
   x.loadxml(xml)

'are we recording?
   isrecording = (x.SelectSingleNode("//recording").InnerText)

'used at debugging stage
   console.writeline(isrecording)

'put a response in a title and change color accordingly
  if isrecording  = true
    API.Function("SetText",Input:="Text Middle Centre Outline.gtzip",SelectedIndex:="0" ,Value:="RECORDING in PROGRESS")
    API.Function("SetTextColour",Input:="Text Middle Centre Outline.gtzip",Value:="red")
  else
    API.Function("SetText",Input:="Text Middle Centre Outline.gtzip",SelectedIndex:="0" ,Value:="ALL CLEAR")
    API.Function("SetTextColour",Input:="Text Middle Centre Outline.gtzip",Value:="green")
 end if

sleep(500)
loop




am sure it can be improved


doggy  
#226 Posted : Friday, March 25, 2022 9:17:34 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Noaksey Go to Quoted Post
I've currently adopted the below to show Streaming status. Please can someone advise how I can reference the individual Streams ie channel1, channel2, channel3



If you have adopted the script it shoul be isstreaming = (x.SelectSingleNode("//streaming").InnerText) to check if one is streaming

to get the individual channels the streaming line in the API XML will contain which channels are true whne the streams are started
Jeffry_Ghost  
#227 Posted : Saturday, April 2, 2022 8:30:37 PM(UTC)
Jeffry_Ghost

Rank: Advanced Member

Groups: Registered
Joined: 9/9/2017(UTC)
Posts: 36
Czech Republic
Location: Jeffry_Ghost

Thanks: 10 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Jeffry_Ghost Go to Quoted Post
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")



THANK YOU a lot. This is exactly what i need. As I can see I just used wrong syntax

Thanks a lot again
Jeffry_Ghost  
#228 Posted : Sunday, April 3, 2022 6:32:40 PM(UTC)
Jeffry_Ghost

Rank: Advanced Member

Groups: Registered
Joined: 9/9/2017(UTC)
Posts: 36
Czech Republic
Location: Jeffry_Ghost

Thanks: 10 times
Was thanked: 2 time(s) in 2 post(s)
Hello again

I'm might be blind or just not able to google it. But how to write into script that I want to run other scripts?
Is it even possible or should I need to write commands into one script.

THX in advantage
doggy  
#229 Posted : Sunday, April 3, 2022 6:44:47 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Jeffry_Ghost Go to Quoted Post
Hello again

I'm might be blind or just not able to google it. But how to write into script that I want to run other scripts?
Is it even possible or should I need to write commands into one script.

THX in advantage


Have you checked the "shortcut function reference" ?

Also in the helpfiles: vMix Scripting supports the majority of VB.NET 2.0 code that will work within a single sub or function.
This means that custom classes and structures are not supported, however you can use the vast majority of the built in base classes in the .NET framework

While you can start another script (with the "ScriptStart" function ) from within a running scritp you cannot use it as a sub or function !
Jeffry_Ghost  
#230 Posted : Sunday, April 3, 2022 7:31:29 PM(UTC)
Jeffry_Ghost

Rank: Advanced Member

Groups: Registered
Joined: 9/9/2017(UTC)
Posts: 36
Czech Republic
Location: Jeffry_Ghost

Thanks: 10 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Jeffry_Ghost Go to Quoted Post
Hello again

I'm might be blind or just not able to google it. But how to write into script that I want to run other scripts?
Is it even possible or should I need to write commands into one script.

THX in advantage


Have you checked the "shortcut function reference" ?

Also in the helpfiles: vMix Scripting supports the majority of VB.NET 2.0 code that will work within a single sub or function.
This means that custom classes and structures are not supported, however you can use the vast majority of the built in base classes in the .NET framework

While you can start another script (with the "ScriptStart" function ) from within a running scritp you cannot use it as a sub or function !


Well I am just too stupid in morning. After your advice I read everything again and get coffe. After that I found solution and it is so easy.

here is what I wanted and it's working Function=ScriptStart&Value=NAMEofSCRIPT

Thank you again Doggy for pointing me in the right direction, I am new to programming and self-taught
doggy  
#231 Posted : Monday, April 11, 2022 3:42:13 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Problem with leading and trailing zeros display when using numbers from CSV datasource (or others) in a title

put them in a hidden text field & Format them to the visible one ;-) Things will look nicer too

Code:
'Read the data from the title connected to the datasource
dim StringVal as string =  Input.Find("Title 0- The Classic Blue.gtzip").Text("Headline.Text") 

dim decimalVar as decimal =  Decimal.Parse(StringVal)

'format the number display
dim ConvResult as string = String.Format("{0:00.00}", decimalVar )

'Write result to the title
API.Function("SetText",Input:="Title 0- The Classic Blue.gtzip",SelectedName:="Description.Text" ,Value:=ConvResult)  

Roy Sinclair  
#232 Posted : Thursday, April 28, 2022 10:11:02 AM(UTC)
Roy Sinclair

Rank: Advanced Member

Groups: Registered
Joined: 11/23/2020(UTC)
Posts: 170
United States
Location: Wichita

Thanks: 10 times
Was thanked: 24 time(s) in 20 post(s)
Originally Posted by: doggy Go to Quoted Post
Problem with leading and trailing zeros display when using numbers from CSV datasource (or others) in a title

put them in a hidden text field & Format them to the visible one ;-) Things will look nicer too

Code:
'Read the data from the title connected to the datasource
dim StringVal as string =  Input.Find("Title 0- The Classic Blue.gtzip").Text("Headline.Text") 

dim decimalVar as decimal =  Decimal.Parse(StringVal)

'format the number display
dim ConvResult as string = String.Format("{0:00.00}", decimalVar )

'Write result to the title
API.Function("SetText",Input:="Title 0- The Classic Blue.gtzip",SelectedName:="Description.Text" ,Value:=ConvResult)  



Shorter but not as clear:

Code:
'Read the data from the title connected to the datasource, parse and then format
dim StringVal as string =  String.Format("{0:00.00}", Decimal.Parse(Input.Find("Title 0- The Classic Blue.gtzip").Text("Headline.Text")))

'Write result to the title
API.Function("SetText",Input:="Title 0- The Classic Blue.gtzip",SelectedName:="Description.Text" ,Value:=ConvResult)  



Good though for keeping scripts shorter
nikosman88  
#233 Posted : Saturday, April 30, 2022 10:06:07 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Hello. Im trying to make a script that will take from a folder the last created folder in which i will have photos and
1.Add this folder as photos input in vmix
2.change transition time to 10 seconds
3.Put this new photos input as layer in another input, which input will allready exist in vmix
I know how to do this if i have predefined names for example "photos1" but if i dont know the name of folder dont know how to do it
I tried to edit the script "Add last recording to vMix as an input" as my needs,but no luck
Can anyone help me please?
doggy  
#234 Posted : Saturday, April 30, 2022 10:42:17 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: nikosman88 Go to Quoted Post
Hello. Im trying to make a script that will take from a folder the last created folder in which i will have photos and
1.Add this folder as photos input in vmix
2.change transition time to 10 seconds
3.Put this new photos input as layer in another input, which input will allready exist in vmix
I know how to do this if i have predefined names for example "photos1" but if i dont know the name of folder dont know how to do it
I tried to edit the script "Add last recording to vMix as an input" as my needs,but no luck
Can anyone help me please?


in short you want to find a folder who you don't know the name of but that was the last created one inside another folder (no need for the other info here)?

loop through all the folders(directories) in your "base" folder and check for the creation date that is the most recent : Directory.GetCreationTime(Folder)
thanks 1 user thanked doggy for this useful post.
nikosman88 on 5/1/2022(UTC)
nikosman88  
#235 Posted : Sunday, May 1, 2022 6:04:47 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Doggy thank you i will try to do this. The situation is not that i dont know the folder name because i set the name. Many times during the show the presenter or co-presenter will send me a link from a site with photos to download or photos in messenger/viber etc to pass in the show and then if we are in a multiview layer i have also to take this new input and send it to a position in multiview layers. And this has to be done as fast as possible because the show is live
I have a base folder where i make folders and inside them i save photos and then input them in vmix. The folder name is usually a name that describe the photos i store there. For example "aeroplanes".
Without scripting i have to go add-->input-->photos-->find folder too much time
The best alternative i have found so far is to store photos in prenamed folders etc "photos1","photos2", and give shortcuts for each of them. This is better than the "whole manual" procedure but i see that i need sometimes photos1,photos2,photos3 and in the middle of the show i cant remember everytime which folder of the photo folders is empty and store there the new photos.So again i loose precious time
Thats why i need something to get in vmix the last created folder and then somehow send this last input in the layer i want. i think this i can do it, the problem is that i cant take the folder in vmix
doggy  
#236 Posted : Sunday, May 1, 2022 6:20:24 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: nikosman88 Go to Quoted Post

I have a base folder

Thats why i need something to get in vmix the last created folder and then somehow send this last input in the layer i want. i think this i can do it,


Same answer as before be it for folder or file search (inside a base folder) , when found perform the function to load the file as an input and then to the a layer specified (Those functions are same as there are shorcut functions) or anything else you want to do with it


Quote:
the problem is that i cant take the folder in vmix


What?
nikosman88  
#237 Posted : Sunday, May 1, 2022 6:57:24 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)




Quote:
What?

Im sorry about this. My english is not very good and i am using words that we use in greek language. I mean i dont know how tell to the script to input the folder in vmix. Im trying to understand how to combine the command you told me in the script ""Add last recording to vMix as an input" but no success for now.



doggy  
#238 Posted : Sunday, May 1, 2022 7:23:39 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: nikosman88 Go to Quoted Post

Quote:
What?

Im sorry about this. My english is not very good and i am using words that we use in greek language. I mean i dont know how tell to the script to input the folder in vmix. Im trying to understand how to combine the command you told me in the script ""Add last recording to vMix as an input" but no success for now.


understand the difference in language but i assume you also have a different name for folder, file and input ? So are you trying to get a (the last) folder (as list or image folder) into vMix or a (the last) file in that folder ?

There is the function "AddInput" (see shortcuts) to use after you located the right folder/file first

Seeing your question is in this thread (instead of a seperate one ) I also assume you have read through the other post to gain insight into vMix (vb.net) scripting and the use of its available functions

foldersearch.jpg (49kb) downloaded 1 time(s).
thanks 1 user thanked doggy for this useful post.
nikosman88 on 5/1/2022(UTC)
nikosman88  
#239 Posted : Sunday, May 1, 2022 2:17:20 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Thank you very very much.It work excellent!
doggy  
#240 Posted : Sunday, May 1, 2022 2:40:15 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: nikosman88 Go to Quoted Post
Thank you very very much.It work excellent!


Good, but would be appreciated if previous question was answered for future reference
Users browsing this topic
Guest (3)
26 Pages«<1011121314>»
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.