logo

Live Production Software Forums


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

Notification

Icon
Error

27 Pages«<252627
Options
Go to last post Go to first unread
doggy  
#521 Posted : Saturday, December 28, 2024 9:20:44 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 965 time(s) in 799 post(s)
Display remaining time of a list playout on a title ( for shits and giggles)

in response to https://forums.vmix.com/...ing-countdown#post116907

Code:
'Get the total duration of a List script by Doggy

'assuming the first item in that list is selected !!!
'playout is set to Auto Next and Auto First !!!
'Things that ight offset the time between countdown and play are transitions used for the list

Dim listInput as integer = 3   'input number of list
Dim titleInp as integer = 5    'input number of title
Dim textIndex as Integer = 0   ' textfield to set countdown 

' Takes a while to Process , depending on number of items in the list !!

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

Dim nodeList As XmlNodeList = x.SelectNodes("//list/item")
dim count as integer = nodeList.count() 
dim selected as string
dim duration as integer

' if first item is not selected add a routine here to do so 

' skip to each item in list to get the duration and tally up
for i as integer = 0 to count-1
  x.loadxml(API.XML())
  nodeList = x.SelectNodes("//list/item")
  duration += x.SelectSingleNode("//input[@number='3']/@duration").Value
  API.Function("NextItem", Input:=3)
  sleep(300)
next

' Convert ms the time 
Dim ts as Timespan= TimeSpan.FromMilliseconds(duration )
Sleep(300)


'Optional
'setting countdown and starting list playback and Countdown

API.Function("StopCountDown", Input:=titleInp ,SelectedIndex:=textIndex )
sleep(100)
API.Function("SetCountDown", Input:=titleInp ,SelectedIndex:=textIndex ,Value:= ts.ToString("hh\:mm\:ss"))
API.Function("ListPlayout",Input:=listInput)
sleep(500)  'adjusting for function calls time
Api.Function("StartCountdown",Input:=titleInp )
API.Function("OverlayInput1In",Input:=titleInp )

'Can add triggers on CountdownCompleted to remove overlay and make a transition 


thanks 1 user thanked doggy for this useful post.
nikosman88 on 12/28/2024(UTC)
NicholasLowFK  
#522 Posted : Thursday, January 2, 2025 6:46:24 PM(UTC)
NicholasLowFK

Rank: Newbie

Groups: Registered
Joined: 1/2/2025(UTC)
Posts: 1
Malaysia
Location: Kuala Lumpur

hi guys,
i have a problem with my scripting, i wish to get my recording status for my following action, for instance, when i toggle my script, if recording status is active i would like to have my title transition out and stop my recording, whereby if recording was not active upon toggling the script i would like to have my recording active and transition in for my title, is it possible?
doggy  
#523 Posted : Thursday, January 2, 2025 7:22:22 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 965 time(s) in 799 post(s)
Originally Posted by: NicholasLowFK Go to Quoted Post
hi guys,
i have a problem with my scripting, i wish to get my recording status for my following action, for instance, when i toggle my script, if recording status is active i would like to have my title transition out and stop my recording, whereby if recording was not active upon toggling the script i would like to have my recording active and transition in for my title, is it possible?


Sure it can , what have you tried so far (can post it here) ? (as there are meny examples in this thread)









https://forums.vmix.com/...ng-for-Dummies#post71124
Users browsing this topic
Guest
27 Pages«<252627
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.