logo

Live Production Software Forums


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

Notification

Icon
Error

26 Pages«<910111213>»
Options
Go to last post Go to first unread
doggy  
#201 Posted : Friday, February 4, 2022 7:33:23 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)
Auto Play/Audio with Mix transitions

For 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#post97309

Code:

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
thanks 4 users thanked doggy for this useful post.
xaver on 2/4/2022(UTC), ron2210 on 2/5/2022(UTC), dmwkr on 2/13/2022(UTC), nikosman88 on 8/25/2022(UTC)
gefiltafish  
#202 Posted : Thursday, February 10, 2022 8:45:58 PM(UTC)
gefiltafish

Rank: Advanced Member

Groups: Registered
Joined: 12/5/2017(UTC)
Posts: 32
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.
doggy  
#203 Posted : Thursday, February 10, 2022 9:30:10 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: gefiltafish Go to Quoted Post
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
doggy  
#204 Posted : Monday, February 14, 2022 6:26:13 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)
A CountDown Alternative

- Changing display format over time hh:mm:ss -> mm:ss -> ss
- Changing colours at specified times

Countdown.png (109kb) downloaded 47 time(s).
thanks 2 users thanked doggy for this useful post.
lemnn on 5/4/2022(UTC), Video-Chopper on 10/18/2023(UTC)
TFrutuoso  
#205 Posted : Saturday, February 19, 2022 4:34:47 AM(UTC)
TFrutuoso

Rank: Newbie

Groups: Registered
Joined: 2/19/2022(UTC)
Posts: 3
Portugal
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!
doggy  
#206 Posted : Saturday, February 19, 2022 4:47:36 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: TFrutuoso Go to Quoted Post


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 ;-)
thanks 1 user thanked doggy for this useful post.
TFrutuoso on 2/21/2022(UTC)
Jeffry_Ghost  
#207 Posted : Monday, February 21, 2022 9:34:53 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 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

TFrutuoso  
#208 Posted : Monday, February 21, 2022 10:12:23 PM(UTC)
TFrutuoso

Rank: Newbie

Groups: Registered
Joined: 2/19/2022(UTC)
Posts: 3
Portugal
Location: Lisbon

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post

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.
TFrutuoso  
#209 Posted : Monday, February 21, 2022 10:17:04 PM(UTC)
TFrutuoso

Rank: Newbie

Groups: Registered
Joined: 2/19/2022(UTC)
Posts: 3
Portugal
Location: Lisbon

Thanks: 1 times
Originally Posted by: Jeffry_Ghost Go to Quoted Post

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.

Code:
Sleep(5000)
waits 5 seconds

Code:
Overlay.Find(2).Out
Disables Overlay 2. Give it a try, let us know if it's what you're looking for!
doggy  
#210 Posted : Tuesday, February 22, 2022 1:07:54 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: 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")
thanks 1 user thanked doggy for this useful post.
Jeffry_Ghost on 4/2/2022(UTC)
andreypetr  
#211 Posted : Tuesday, February 22, 2022 11:01:43 PM(UTC)
andreypetr

Rank: Advanced Member

Groups: Registered
Joined: 1/31/2017(UTC)
Posts: 92
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
doggy  
#212 Posted : Wednesday, February 23, 2022 12:56:10 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: andreypetr Go to Quoted Post
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
andreypetr  
#213 Posted : Wednesday, February 23, 2022 12:56:51 AM(UTC)
andreypetr

Rank: Advanced Member

Groups: Registered
Joined: 1/31/2017(UTC)
Posts: 92
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 titles

Code:
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)
andreypetr  
#214 Posted : Wednesday, February 23, 2022 12:59:13 AM(UTC)
andreypetr

Rank: Advanced Member

Groups: Registered
Joined: 1/31/2017(UTC)
Posts: 92
Location: KZ

Thanks: 3 times
Was thanked: 10 time(s) in 10 post(s)
Originally Posted by: doggy Go to Quoted Post
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.
thanks 1 user thanked andreypetr for this useful post.
doggy on 2/23/2022(UTC)
doggy  
#215 Posted : Wednesday, February 23, 2022 2:37:42 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: andreypetr Go to Quoted Post
After reading the thread and copying tidbits from other solutions I came up with this.

Swap 2 text titles

a little easier to retrieve title content

Code:
dim player1  = Input.Find("Name").Text("Headline.Text") 


thanks 1 user thanked doggy for this useful post.
andreypetr on 2/23/2022(UTC)
gefiltafish  
#216 Posted : Thursday, March 3, 2022 5:03:20 AM(UTC)
gefiltafish

Rank: Advanced Member

Groups: Registered
Joined: 12/5/2017(UTC)
Posts: 32
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?

doggy  
#217 Posted : Thursday, March 3, 2022 5:25:54 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: gefiltafish Go to Quoted Post
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)

gefiltafish  
#218 Posted : Thursday, March 3, 2022 5:30:41 AM(UTC)
gefiltafish

Rank: Advanced Member

Groups: Registered
Joined: 12/5/2017(UTC)
Posts: 32
Location: Zagreb

Thanks: 8 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: gefiltafish Go to Quoted Post
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 :)
doggy  
#219 Posted : Thursday, March 3, 2022 5:38: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: gefiltafish Go to Quoted Post


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 ;-)
thanks 1 user thanked doggy for this useful post.
gefiltafish on 3/3/2022(UTC)
Jaa_Han  
#220 Posted : Saturday, March 12, 2022 9:45:44 AM(UTC)
Jaa_Han

Rank: Member

Groups: Registered
Joined: 8/20/2021(UTC)
Posts: 16
Germany
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.
Users browsing this topic
26 Pages«<910111213>»
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.