Rank: Newbie
Groups: Registered
Joined: 11/23/2018(UTC) Posts: 3
|
Thanks for your ideas, after playing around with the scripting feature of vmix, i made a script which constantly checks if the textfield is empty and if ocr sends the penalty to the textfield the corresponding background is shown. Script: Quote:dim i = Input.Find("scoreboard.xaml")
Do
dim gast1 = i.Text("Min_Gast_1_txt") if gast1 = "" API.Function("SetImage", "scoreboard.xaml", "", "7", "Min_Gast_1") else API.Function("SetImage", "scoreboard.xaml", "C:/Users/Livestream/Desktop/Scoreboard/2min_gast1.png", "7", "Min_Gast_1") End If
dim gast2 = i.Text("Min_Gast_2_txt") if gast2 = "" API.Function("SetImage", "scoreboard.xaml", "", "8", "Min_Gast_2") else API.Function("SetImage", "scoreboard.xaml", "C:/Users/Livestream/Desktop/Scoreboard/2min_gast2.png", "8", "Min_Gast_2") End If
dim gast3 = i.Text("Min_Gast_3_txt") if gast3 = "" API.Function("SetImage", "scoreboard.xaml", "", "9", "Min_Gast_3") else API.Function("SetImage", "scoreboard.xaml", "C:/Users/Livestream/Desktop/Scoreboard/2min_gast3.png", "9", "Min_Gast_3") End If
dim heim1 = i.Text("Min_Heim_1_txt") if heim1 = "" API.Function("SetImage", "scoreboard.xaml", "", "10", "Min_Heim_1") else API.Function("SetImage", "scoreboard.xaml", "C:/Users/Livestream/Desktop/Scoreboard/2min_heim1.png", "10", "Min_Heim_1") End If
dim heim2 = i.Text("Min_Heim_2_txt") if heim2 = "" API.Function("SetImage", "scoreboard.xaml", "", "11", "Min_Heim_2") else API.Function("SetImage", "scoreboard.xaml", "C:/Users/Livestream/Desktop/Scoreboard/2min_heim2.png", "11", "Min_Heim_2") End If
dim heim3 = i.Text("Min_Heim_3_txt") if heim3 = "" API.Function("SetImage", "scoreboard.xaml", "", "12", "Min_Heim_3") else API.Function("SetImage", "scoreboard.xaml", "C:/Users/Livestream/Desktop/Scoreboard/2min_heim3.png", "12", "Min_Heim_3") End If Sleep(500) Loop I know its not the nicest code but it works :) I got one more Question, is it possible to force ocr to submit the leading zero? So to get 02:00 for two minutes even if the scoreboard only shows 2:00? Greetings Alex
|