logo

Live Production Software Forums


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

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
nikosman88  
#21 Posted : Saturday, December 17, 2022 6:54:43 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 118 times
Was thanked: 68 time(s) in 64 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: nikosman88 Go to Quoted Post

With all respect also you come here and ask for help on how to do what you want to do. And everybody here tries to help you.


Yeah, a few suggestions have been offered, but an ignorance of my use case remains.

Personally i dont think is an ignorance. If you want to take the correct answer you have to do the correct question. See for example what doggy says who is here and help everyone for free
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.



One can retrieve the current index , the list of items , the count of items in the list, the current status of an item in this list etc . (or anything that is presented inthe vMix API XML)

Still don't fully understand the goal though ( restart, loop , switch, continue ???)

So in your problem the correct question is how to retrieve from API the current index, the list of items and the count of items in the list and then you move on the next step.

P.S. Im newbie in scripting too, but guys in this forum help me everytime i want something to do. Im very thankfull that this forum exists
mirrormatt86  
#22 Posted : Saturday, December 17, 2022 6:58:13 AM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

So it's the student's fault for not asking the right question. Sounds like the American education system...

doggy has not provided me with any information I did not already know and he did not answer the question simply stated a fact.
doggy  
#23 Posted : Saturday, December 17, 2022 10:25:03 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 953 time(s) in 788 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
So it's the student's fault for not asking the right question. Sounds like the American education system...


LOL. You do realize we both are not American? And yes Can not get a correct answer with incorrect questions or in other words, the answers reflect the questions

Quote:
doggy has not provided me with any information I did not already know and he did not answer the question simply stated a fact.


Humor us: You know the information but don't know how to get them as like : please give me code in how to retrieve that info ?

Part of being questioned is to figure out exactly what is being asked to give a proper answer in terms of coding needed to do the job which is by far more than just the initial posting of "How to restart a list"

Also to avoid remarks like here being a bold claim https://forums.vmix.com/posts/m106159-Scripting-for-Dummies#post106159 you fail to respond to

Oh well, we tried
mirrormatt86  
#24 Posted : Saturday, December 17, 2022 1:00:41 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

You don’t get Australian sarcasm do you?

Round and round we go. No help to be found in this forum.
nikosman88  
#25 Posted : Monday, December 19, 2022 5:04:12 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 118 times
Was thanked: 68 time(s) in 64 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
You don’t get Australian sarcasm do you?

Round and round we go. No help to be found in this forum.


Here is a way to do this with the use of triggers (@run the script after you transition out from each list) and if you know how many items are in the list. Ok maybe it is not the best way
but it is a way to do it. Let`a say for a list that have 5 items
Code:
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)

'set the name of your list
dim SI = (x.SelectSingleNode("//input[@shortTitle='Mylist1']/@selectedIndex").Value)

'set the numbers of your list items and decide what to do
If SI = "5" Then
API.Function("Selectindex", Value:="1", Input:="Mylist1")
ElseIf SI < 5 Then
API.Function("NextItem", Input:="1")
End if
Papo  
#26 Posted : Saturday, January 14, 2023 6:03:49 AM(UTC)
Papo

Rank: Advanced Member

Groups: Registered
Joined: 6/16/2020(UTC)
Posts: 77
Peru

Thanks: 8 times
Was thanked: 2 time(s) in 2 post(s)
I would like to be able to understand what the user wants, maybe it's just using a script, and go through all the lists, and within those lists play the files, when finished playing the last file in the list, exit and continue with the next list , being in the last list at the end of this restart and return to the first list and continue with that loop, it will be like this or I am wrong
translated from spanish to english with google
mirrormatt86  
#27 Posted : Saturday, January 14, 2023 6:10:40 AM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

I guess I just didn't understand how basic I needed to spell it out for this forum.

I have a list.
It has - for example - 20 videos.
The production has multiple lists.
We want to automate the production as much as possible. (It's a 24 hour streaming channel)
We cant use AUTO NEXT, because we want to play each of these lists one after the other - after each video.
We cant use LOOP to continuously play the videos in the list.

We therefore need a way, through script, for vMix to look at the item number in that list, and if it equals the total number of videos in the list (which is manually set, that's ok) then restart the list (via SetSelectedIndex)

Running the script OnTransitionOut makes sure vMix only checks after the video is played.

Quite frankly this forum shouldn't be all about leading horses to water, if some members are able (and willing) to directly help. I'm not stupid, but sending me to other posts which do not explain my need because you don't understand and want to be dismissive is ridiculous.

I didn't see the reply from nikosman88, I'll try this today.
Papo  
#28 Posted : Monday, January 16, 2023 7:23:58 AM(UTC)
Papo

Rank: Advanced Member

Groups: Registered
Joined: 6/16/2020(UTC)
Posts: 77
Peru

Thanks: 8 times
Was thanked: 2 time(s) in 2 post(s)
Hello, look, this is something basic, you can adjust it or change some things to fit your needs,
1.- Create a new project, create 4 list entries with the videos you want in each of them.
2.- Rename list entries as "List1","List2","List3","List4"
3.- copy the following script and execute it, being clear the lists turned off with autonext disabled and the loop also disabled.

What the script will do is play the first list because ListSelected is =0 and in NameList the index 0 has the list value "List1", and it will play the first item because ItemSelected is = 1.
when finished it will go to the next list and play the next item of the currently selected one.
And so, if the list ends, it will go to the first one, if each list runs out of items, it will return to the first item of its own list, well that's what I wanted to do, I'm not sure I'm doing it right, try it, Greetings.
Translated from Spanish to English by Google


Sorry for not describing with comments the actions that the script does

Code:
dim x as new xmldocument
dim InputList as object
dim NameList() as string = {"List1","List2","List3","List4"}
dim ItemSelected as short = 1
dim ListSelected as short = 0
Do While True
 InputList = input.find(NameList(ListSelected))
 InputList.function("SelectIndex",ItemSelected)
 sleep(100)
 InputList.function("ActiveInput")       
 InputList.function("Play")
 api.Function("WaitForCompletion",NameList(ListSelected))
 if ListSelected = 3 then ListSelected = 0 else ListSelected = ListSelected + 1
 x.loadxml(api.xml()) 
 ItemSelected = x.selectsinglenode("//inputs/input[@shortTitle='" & NameList(ListSelected) & "']/@selectedIndex").value
 if  ItemSelected = x.selectnodes("//inputs/input[@shortTitle='" & NameList(ListSelected) & "']/list/item").Count  then ItemSelected = 1 else  ItemSelected = ItemSelected + 1
Loop
thanks 1 user thanked Papo for this useful post.
nikosman88 on 1/19/2023(UTC)
mirrormatt86  
#29 Posted : Wednesday, January 18, 2023 8:17:34 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Originally Posted by: nikosman88 Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
You don’t get Australian sarcasm do you?

Round and round we go. No help to be found in this forum.


Here is a way to do this with the use of triggers (@run the script after you transition out from each list) and if you know how many items are in the list. Ok maybe it is not the best way
but it is a way to do it. Let`a say for a list that have 5 items
Code:
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)

'set the name of your list
dim SI = (x.SelectSingleNode("//input[@shortTitle='Mylist1']/@selectedIndex").Value)

'set the numbers of your list items and decide what to do
If SI = "5" Then
API.Function("Selectindex", Value:="1", Input:="Mylist1")
ElseIf SI < 5 Then
API.Function("NextItem", Input:="1")
End if


This is great, however it only works if the list is input 1. All other lists trigger the list on input 1 (so it doesn't work for multiples, or any preset where the list is not first)\


So in conclusion, vMix can't handle this basic task of being a play out controller and I need to invest thousands of dollars.
nikosman88  
#30 Posted : Wednesday, January 18, 2023 9:49:36 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 118 times
Was thanked: 68 time(s) in 64 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: nikosman88 Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
You don’t get Australian sarcasm do you?

Round and round we go. No help to be found in this forum.


Here is a way to do this with the use of triggers (@run the script after you transition out from each list) and if you know how many items are in the list. Ok maybe it is not the best way
but it is a way to do it. Let`a say for a list that have 5 items
Code:
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)

'set the name of your list
dim SI = (x.SelectSingleNode("//input[@shortTitle='Mylist1']/@selectedIndex").Value)

'set the numbers of your list items and decide what to do
If SI = "5" Then
API.Function("Selectindex", Value:="1", Input:="Mylist1")
ElseIf SI < 5 Then
API.Function("NextItem", Input:="1")
End if


This is great, however it only works if the list is input 1. All other lists trigger the list on input 1 (so it doesn't work for multiples, or any preset where the list is not first)\


So in conclusion, vMix can't handle this basic task of being a play out controller and I need to invest thousands of dollars.

hello. have you tried to change the input number? If you have a list in input2 and you name it mylist2 you have to change these values in the script so you must have a script for each list with exact numbers of items that will trigger to run in transition out.So if you have 5 lists, you need 5 scripts and in each script you have to change the API.Function("Selectindex", Value:="1", Input:="Mylist1-->make it mylist2,3,etc") and the API.Function("NextItem", Input:="1-->makeit 2,3,4 or mylist2,3,4 etc") to match to name or input of every list
Users browsing this topic
Guest
2 Pages<12
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.