Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
Hi brains trust. short of vb.net scripting, is there any way to have a list restart from the top without LOOP (since that just repeats the individual list item if AUTO NEXT is off)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
You don't need script for this. Just make a shortcut with command selectindex and value 1
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
Originally Posted by: nikosman88 You don't need script for this. Just make a shortcut with command selectindex and value 1 hi mate, except that just restarts the list without regard for where it is in the list. I have several lists that we're cycling through. Play one video, then play the next in a different list ... then rinse and repeat a few more times. List 1 - say - has 20 clips, list 2 has 50. So List one will reach the end before list two and once we come back to list one we'll just repeat that 20th clip... until there is manual intervention to restart the list.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
Code:dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
If API.Function("SetIndex").Input.Find("list1").Value = "20"
then
API.Function("SetIndex", Input:="list1", Value:="1"
end if
?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
Ok so you want to restart a list without knowing if the clip you play manually, is or not the last clip in the list. This may involve some scripting with active window. Don't know personally how to do this but I've read some examples in topic script for dummies. I think you have to make a script that will check name of the last clip in the list is same name at pgm/active window and if then go to top But also in this situation you have either to edit the script if the last clip in a list changes name or change the name of the last clip inside the list
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
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.
It's writing that that I'm stuck on.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
See this script https://forums.vmix.com/...ng-for-Dummies#post94381You can to try to do something similar. Put in the end of your list a clip with dummy name that will contain a word you want like vot or not or whatever you want. Then if script finds or not this word go or not go to the top of the list
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,257 Location: Belgium Thanks: 294 times Was thanked: 965 time(s) in 799 post(s)
|
Originally Posted by: mirrormatt86 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 ???)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
Originally Posted by: doggy Originally Posted by: mirrormatt86 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 ???) Hi mate, I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)... vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop. UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list. So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1. Hopefully that's a bit clearer?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,257 Location: Belgium Thanks: 294 times Was thanked: 965 time(s) in 799 post(s)
|
Originally Posted by: mirrormatt86 Originally Posted by: doggy Originally Posted by: mirrormatt86 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 ???) Hi mate, I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)... vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop. UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list. So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1. Hopefully that's a bit clearer? why not create one list (easy to import/export a list and edit = text file) ? You mention can't use loop (same episode on repeat) but also you mention an infinite loop ? Sorry not clear at all (essential for creating a script) "poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
Originally Posted by: mirrormatt86 Originally Posted by: doggy Originally Posted by: mirrormatt86 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 ???) Hi mate, I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)... vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop. UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list. So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1. Hopefully that's a bit clearer? So it plays every time the same episodes one by one from one list to next list? If so you need something that will automatically play your inputs. If so i will suggest and something else. See vscheduler for vmix https://forums.vmix.com/...ler---vMixScheduler-Fork it have it`s own list that plays inside vmix in the time you want, you can do copy-paste-insert inside list, see exact time when a clip starts or ends
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
Originally Posted by: doggy Originally Posted by: mirrormatt86 Originally Posted by: doggy Originally Posted by: mirrormatt86 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 ???) Hi mate, I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)... vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop. UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list. So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1. Hopefully that's a bit clearer? why not create one list (easy to import/export a list and edit = text file) ? You mention can't use loop (same episode on repeat) but also you mention an infinite loop ? Sorry not clear at all (essential for creating a script) "poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before I agree with you. But list system in vmix can go too heavy (depends on pc specs of course) if you load too many items. So it is better if you have too many files to split them in 2 or more lists
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
Originally Posted by: doggy why not create one list (easy to import/export a list and edit = text file) ? You mention can't use loop (same episode on repeat) but also you mention an infinite loop ? Sorry not clear at all (essential for creating a script)
"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before
Because one list will play over 980+ episodes in order (or in some random order that I have no control over) I can't use the list's LOOP function as it will loop that list. The infinite loop is playing between each list. I was pretty clear in the beginning and even showed my attempted script... OnTransitionOut -> Run Script Script needs to be: Load API Read IndexValue of list1 If IndexValue=20 THEN SetIndexValue=1 Else DO NOTHING The examples being linked to in that other thread do not work and are not fit for this purpose.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,257 Location: Belgium Thanks: 294 times Was thanked: 965 time(s) in 799 post(s)
|
Originally Posted by: mirrormatt86 Originally Posted by: doggy why not create one list (easy to import/export a list and edit = text file) ? You mention can't use loop (same episode on repeat) but also you mention an infinite loop ? Sorry not clear at all (essential for creating a script)
"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before
Because one list will play over 980+ episodes in order (or in some random order that I have no control over) I can't use the list's LOOP function as it will loop that list. The infinite loop is playing between each list. I was pretty clear in the beginning and even showed my attempted script... OnTransitionOut -> Run Script Script needs to be: Load API Read IndexValue of list1 If IndexValue=20 THEN SetIndexValue=1 Else DO NOTHING The examples being linked to in that other thread do not work and are not fit for this purpose. With all due respect you have no idea how to script and even claim a posted script in "scripting for dummies" is wrong becasue it just doesn't work for you without even bothering to answer the subsequent question so far . First one has to detail the procesflow of what you want to achieve (in detail) based on what criteria etc. (Its called a flowchart). Have to check if the functions needed in that flow are available and how to best implement them. If somethng isnot directly avaialable, is there a way to get that anyway or what alternative does one has to come up with. There is a need to capture and solve the what if's too. What seems like a simple idea might turn out to be a very complex thing to find a proper logic to as a script. Script tidbits that are linked to are almost never the full solution but merely ideas to work from and adjust
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
Originally Posted by: mirrormatt86 Originally Posted by: doggy why not create one list (easy to import/export a list and edit = text file) ? You mention can't use loop (same episode on repeat) but also you mention an infinite loop ? Sorry not clear at all (essential for creating a script)
"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before
Because one list will play over 980+ episodes in order (or in some random order that I have no control over) I can't use the list's LOOP function as it will loop that list. The infinite loop is playing between each list. I was pretty clear in the beginning and even showed my attempted script... OnTransitionOut -> Run Script Script needs to be: Load API Read IndexValue of list1 If IndexValue=20 THEN SetIndexValue=1 Else DO NOTHING The examples being linked to in that other thread do not work and are not fit for this purpose. So you have 13 lists in vmix with various file names and every lists has different quantity of files that you play between them in a circle and you want a script that will "understand" which is last file in every list and after the completion of this last file in any list, this list will go again to first file. Right?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 4/23/2017(UTC) Posts: 1,235 Location: Germany Thanks: 3 times Was thanked: 169 time(s) in 151 post(s)
|
Can't you check the length of a given list and do a modulo. Every time there is no rest start the list again. This way the script can be used generally, the lists can change over time (more/less items). You may even wan't to write to a simple text file for how often you repeated a list or item inside if you need it for reportings (adds)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
Originally Posted by: mavik Can't you check the length of a given list and do a modulo. Every time there is no rest start the list again. This way the script can be used generally, the lists can change over time (more/less items). You may even wan't to write to a simple text file for how often you repeated a list or item inside if you need it for reportings (adds) He says that he has auto next disabled and want to move between lists. By this case every time a video plays and ends it will be zero duration the list. How can you know that really you are in the end of list?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
With all due respect, I don’t need to know the ins and outs of scripting - that’s why I came to the forum. I understand that it’s tiresome, annoying and frustrating for senior users to have to answer questions daily on these matters - but my advice there would be, stop doing it.
You’re all getting stuck on some pretty basic stuff - how will the script know when it’s the end of the list? what you’re doing is stupid. What your asking for needs to be learnt by yourself - defeating the purpose of the forum.
I know what the final SelectedIndex value will be, the script doesn’t need to guess it.
I will create a script for each list and I will tell it what the end of the list is and then what to do. The script will then run each time the list transitions out. If the condition is true then it will execute the next line.
Don’t presume to tell me what I do and don’t know, when I have answered your questions and you are simply returning to say that I am stupid… a common failing of these forums.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 558 Location: athens Thanks: 134 times Was thanked: 76 time(s) in 72 post(s)
|
Originally Posted by: mirrormatt86 With all due respect, I don’t need to know the ins and outs of scripting - that’s why I came to the forum. I understand that it’s tiresome, annoying and frustrating for senior users to have to answer questions daily on these matters - but my advice there would be, stop doing it.
You’re all getting stuck on some pretty basic stuff - how will the script know when it’s the end of the list? what you’re doing is stupid. What your asking for needs to be learnt by yourself - defeating the purpose of the forum.
I know what the final SelectedIndex value will be, the script doesn’t need to guess it.
I will create a script for each list and I will tell it what the end of the list is and then what to do. The script will then run each time the list transitions out. If the condition is true then it will execute the next line.
Don’t presume to tell me what I do and don’t know, when I have answered your questions and you are simply returning to say that I am stupid… a common failing of these forums. 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.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 12/13/2022(UTC) Posts: 15
|
Originally Posted by: nikosman88 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.
|
|
|
|
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