Introduction #
button Scrips #
###lopen
Todo
###technisch
cmaera knoppen #
per camera groep (max 6) script tag toevoegen
let op! -geef aan welke camera roep het is bij variable “Field” -geef aan naar welk event groep de camera’s heen moeten bij bij variable “input”
Dim field As integer = 1 Dim input As Char = “A” Dim Camera1 As String Dim Camera2 As String
Dim inputN As integer inputN=(Char.ConvertToUtf32(input,0)-Char.ConvertToUtf32(“A”,0))*2+2
Dim currentRow As String () dim xml as string = API.XML() dim x as new system.xml.xmldocument x.loadxml(xml) Dim delays() as String= (x.SelectSingleNode("//dynamic/value1").InnerText).Split(";“c) ReDim Preserve delays (Math.Max(field*2-1,delays.length))
Using CSVReader As New Microsoft.VisualBasic.FileIO.TextFieldParser (“C:\Users\woute\Documents\event.settings.txt”)
CSVReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
CSVReader.SetDelimiters (”,")
CSVReader.CommentTokens = New String (){ "" }
CSVReader.HasFieldsEnclosedInQuotes = True
While Not CSVReader.EndOfData
currentRow = CSVReader.ReadFields ()
If String.Compare (currentRow (1), field.ToString ("0") & ".1") = 0
Camera1 = currentRow (0)
Console.WriteLine ("cam1=" & currentRow (0))
delays(field*2-2)=currentRow (3)
end If
If String.Compare (currentRow (1), field.ToString ("0") & ".2") = 0
Camera2 = currentRow (0)
Console.WriteLine ("cam2=" & currentRow (0))
delays(field*2-1)=currentRow (3)
end If
End While
end using dim test as String=string.Join( “;",delays) Console.WriteLine (“delays=” & test )
API.Function(“SetDynamicValue1”, Value:=test)
API.Function (“NDISelectSourceByName”, Input: = inputN, Value:= Camera1) API.Function(“NDISelectSourceByName”, Input:=inputN+1, Value:=Camera2)
slomo knoppen #
let op! -geef aan naar welk event groep de camera’s heen moeten bij bij variable “input”
Dim input As Char = “A” Dim time1 As integer Dim time2 As integer Dim inputN As integer inputN=(Char.ConvertToUtf32(input,0)-Char.ConvertToUtf32(“A”,0))+1 ‘Move all events from bank N+10 to bank 1 (index 0) ‘Move previous and last events to bank 1 (index 0) API.Function(“ReplaySelectEvents”&(inputN+10).ToString(“0”)) API.Function(“ReplaySelectPreviousevent”) API.Function(“ReplayMoveSelectedEvent”,Value:= inputN-1) API.Function(“ReplaySelectLastevent”) API.Function(“ReplayMoveSelectedEvent”,Value:= inputN-1) ‘Show bank 1 API.Function(“ReplaySelectEvents”&(inputN).ToString(“0”))
Dim currentRow As String () dim xml as string = API.XML() dim x as new system.xml.xmldocument x.loadxml(xml) Dim delays() as String= (x.SelectSingleNode(”//dynamic/value1").InnerText).Split(";“c) ReDim Preserve delays (Math.Max(inputN+1,delays.length)) time1 = Convert.toInt32(delays(inputN+1)) Console.WriteLine (“time1=” & time1) time2 = Convert.toInt32(delays(inputN+2)) Console.WriteLine (“time2=” & time2) ‘Create 2 mark-out with different lenghts
API.Function(“ReplayMarkInOut”, Value:=time1) API.Function(“ReplayMarkInOut”, Value:=time2)
‘Select previous event, turn on 1 and turn off remaining API.Function(“ReplaySelectPreviousEvent”) API.Function(“ReplaySelectedEventCameraOn”,Value:=(inputN-1)*2+1) For id As Integer= 1 To 6 If id <> (inputN-1)*2+1 then API.Function(“ReplaySelectedEventCameraOff”,Value:=id) end if Next ‘Move selected to bank N+10 (index N+10-1) API.Function(“ReplayMoveSelectedEvent”,Value:=inputN+10-1)
‘Select previous event, turn on 2 and turn off remaining API.Function(“ReplaySelectLastEvent”) API.Function(“ReplaySelectedEventCameraOn”,Value:=(inputN-1)*2+2) For id As Integer= 1 To 6 If id <> (inputN-1)*2+2 then API.Function(“ReplaySelectedEventCameraOff”,Value:=id) end if Next ‘Move selected to bank N+10 (index N+10-1) API.Function(“ReplayMoveSelectedEvent”,Value:=inputN+10-1)