Scripted Output gives you total control of digit validation and format sent to GFX engine using scripting language. Here is what you can do:
We have provided some examples below, but feel free to send us an email and we will prepare one for your specific case.
if (field["period"].size() > 0) { if (field["period"] == "0") { output = "not started" } else if (field["period"] == "1") { output = "period 1" } else if (field["period"] == "2") { output = "period 2" } else if (field["period"] == "3") { output = "period 3" } else if (number(field["period"]) > 3) { output = "overtime" } } else { output = "" }
—-
output = ""; if (field["down"] == "" || field["distance"] == "" || number(field["down"]) >= 5 || number(field["down"]) == 0) { output = "" } else { if (field["down"][0] == "1") { output = "1st" } else if (field["down"][0] == "2") { output = "2nd" } else if (field["down"][0] == "3") { output = "3rd" } else if (field["down"][0] == "4") { output = "4th" } output = output + " " + "%26" + " " + field["distance"] }
if (number(field["fouls_a"]) >= 5) { output = "BONUS" } else { output = field["fouls_a"] }
if (number(field["score_a"]) <= 10) { output = field["score_a"] }
output = field["down"]; output[output.size() - 3] = '.';
if (number(field["score_a"]) < 10) { output = "0" + field["score_a"] } else { output = field["score_a"] }
output = "Home team just scored and is leading " + field["score_a"] " over " + field["score_b"]
if (field["fouls_b"].size() > 0) { if (field["fouls_b"] == "1") { output = "C:\\Samples\\fouls1.png" } else if (field["fouls_b"] == "2") { output = "C:\\Samples\\fouls2.png" } else if (field["fouls_b"] == "3") { output = "C:\\Samples\\fouls3.png" } else if (field["fouls_b"] == "4") { output = "C:\\Samples\\fouls4.png" } else if (number(field["fouls_b"]) >= 5) { output = "C:\\Samples\\fouls5.png" } else { output = "C:\\Samples\\transparent.png" } } else { output = "C:\\Samples\\transparent.png" }
Here are some additional instructions for vMix
if (field["penalty_a1"] == "") { output = "C:\\Samples\\transparent.png" } else { output = "C:\\Samples\\penalty_background.png" }
Here are some additional instructions for vMix
if (field["time"][1] ==':') { output = "0" + field["time"] } else { output = field["time"] }
if (number(field["score_a"]) - number(old["score_a"]) == 3) { output = "C:\\Samples\\3pts.png" } else { output = "C:\\Samples\\transparent.png" }
Here are some additional instructions for vMix
You will need at least version 21.02.18 installed for this to work.
output = field["time2"]; if (field["period"] == "2") { if (output.size() == 5) { output[output.size() - 5] = '3' } else if (output.size() == 4) { output = "2" + output } } else if (field["period"] == "3") { if (output.size() == 5) { output[output.size() - 5] = '5' } else if (output.size() == 4) { output = "4" + output } } else if (field["period"] == "4") { if (output.size() == 4) { output = "6" + output } }
if (field["shot_clock"].size() > 0) { if ((number(field["shot_clock"]) < 6) || (field["shot_clock"].size() == 3)) { output = "C:\\Samples\\red.png" } else { output = "C:\\Samples\\transparent.png" } } else { output = "C:\\Samples\\transparent.png" }
Here are some additional instructions for vMix
if (field["period"].size() > 0) { if (number(field["period"][0] + "") > 4) { output = "" } else { if (field["period"][0] == "0") { output = "" } else if (field["period"][0] == "1") { output = "1st" } else if (field["period"][0] == "2") { output = "2nd" } else if (field["period"][0] == "3") { output = "3rd" } else if (field["period"][0] == "4") { output = "OT" } } } else { output = "" }
- Assumption is that 'E' will be recognized as '6'. If there is a different symbol instead of 'E', this might not work.
- This should also work if there are two symbols such as '1Q'
if (field["HomeTeamFoul"].size() > 0) { if (number(field["HomeTeamFoul"]) >= 1) { output = "true" } else { output = "" } } else { output = "" }
- You can use “Glass” basketball template from Singular.live marketplace
- The object we are trying to control is a checkbox Control Field that is labeled “team1Timeout1”
- That checkbox is linked a visibility checkbox that turns on and off the layer visibility for the timeout indicator
if (field["test1"].size() > 0) { if (field["test1"].size() == 3) { output = field["test1"][field["test1"].size() - 3] + ""; } else { output = ""; } output = output + field["test1"][field["test1"].size() - 2] + "."; output = output + field["test1"][field["test1"].size() - 1] + "k"; } else { output = ""; }
if(field["period"] == "2nd"){ output = field["score_a"] }
You need at least version 21.02.18 installed
if (field["time"].size() == 3) { output = field["time"][field["time"].size() - 3] + ":" + field["time"][field["time"].size() - 2] + field["time"][field["time"].size() - 1]; } else if (field["time"].size() == 4) { output = field["time"][field["time"].size() - 4] + ":" + field["time"][field["time"].size() - 3] + field["time"][field["time"].size() - 2] + "." + field["time"][field["time"].size() - 1]; } else { output = ""; }
-if there are 3 digits, then output m:ss
-if there are 4 digits, then output m:ss.d
-make sure you choose 'Custom' format for time and check 'Output leading zeros' checkbox
NOT YET IMPLEMENTED
output = ""; if (field["test1"].size() >= 6) { output = output + field["test1"][field["test1"].size() - 6]; } if (field["test1"].size() >= 5) { output = output + field["test1"][field["test1"].size() - 5]; } else { output = output + "0"; } output = output + ":"; if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4]; } else { output = output + "0"; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3]; } else { output = output + "0"; } output = output + ":"; if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } else { output = output + "0"; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; } else { output = output + "0"; }
-Its important that you use “Custom” format for the source field
output = field["time"]; if (field["time"].size() > 0) { if (field["time"][field["time"].size() - 2] == ".") { if (output.size() == 3) { output = "0:0" + field["time"] } else if (output.size() == 4) { output = "0:" + field["time"] } } else { output = field["time"]; } } else { output = ""; }
output = field["shot"]; if (field["shot"].size() > 1) { if (field["shot"][field["shot"].size() - 2] == ".") { output = field["shot"][0] + ""; } else { output = field["shot"]; } } else if (field["shot"].size() == 0) { output = ""; }
Here are some additional instructions for vMix
if (field["serve_a"] == "1") { output = "C:\\Samples\\serve.png" } else { output = "C:\\Samples\\transparent.png" }
if (field["BreakTime"].size() > 0) { if ((field["BreakTime"] == "0:00") || (field["BreakTime"] == "0.0")) { output = ""; } else { output = field["BreakTime"]; } } else { output = ""; }
output = ""; if (field["test1"].size() == 6) { output = output + field["test1"][field["test1"].size() - 6] + ":"; } if (field["test1"].size() >= 5) { output = output + field["test1"][field["test1"].size() - 5]; } if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4] + ":"; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3]; } if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } else { output = output + "0"; } output = output + "."; if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; } else { output = output + "0"; } if (field["test2"].size() == 1) { output = output + field["test2"]; }
Assumption - usually in athletics and swimming clock running is in h:mm:ss.d format, but when it stops it changes to h:mm:ss.dd format
-create two custom fields test1 and test2
-add all h:mm:ss.d digits to test1 (do not add the 1/100th of the second)
-add only 1/100th of the second to test2 field
output = ""; if (field["test1"].size() == 6) { output = output + field["test1"][field["test1"].size() - 6]; } if (field["test1"].size() >= 5) { output = output + field["test1"][field["test1"].size() - 5] + ":"; } if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4]; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3] + "."; } if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; }
No normal camera can capture 100 frames per second, so it is impossible to display 1/100 of a second, but in many cases the time runs at rate of 1/10 and 1/100 is only displayed as a static clock, which can be easily read by Scoreboarc OCR and a standard camera. Here is how to make it happen:
if (number(field["HF"]) == number(field["VF"])) { output = "No Advantage" } else if (number(field["HF"]) > number(field["VF"])) { output = "Adv. " + (field["HomeTeam"]) } else if (number(field["HF"]) < number(field["VF"])) { output = "Adv. " + (field["HomeTeam"]) }
output = field["score2"] + "-" + field["score1"]
output = ""; if (field["test1"].size() == 5) { output = output + field["test1"][field["test1"].size() - 5]; } if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4]; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3]; } else { output = output + "0"; } output = output + "."; if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } else { output = output + "0"; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; } else { output = output + "0"; }
-Its important that you use “Custom” format for the source field
if (field["period"].size() > 0) { if (number(field["period"][0] + "") > 4) { output = "" } else { if (field["period"][0] == "0") { output = "" } else if (field["period"][0] == "1") { output = "1st" } else if (field["period"][0] == "2") { output = "2nd" } else if (field["period"][0] == "3") { output = "3rd" } else if (field["period"][0] == "4") { output = "OT" } } } else { output = "" }
if (field["field1"] == "") { output = "0" } else { output = field["field1"] }
output = ""; if (field["test1"].size() >= 5) { output = output + field["test1"][field["test1"].size() - 5]; } if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4]; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3] + "."; } else { output = "0."; } if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } else { output = output + "0"; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1] + " km/sec"; }
output = ""; if (field["test1"].size() >= 7) { output = output + field["test1"][field["test1"].size() - 7]; } if (field["test1"].size() >= 6) { output = output + field["test1"][field["test1"].size() - 6]; } if (field["test1"].size() >= 5) { output = output + field["test1"][field["test1"].size() - 5]; } else { output = output + "0"; } output = output + "."; if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4]; } else { output = output + "0"; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3]; } else { output = output + "0"; } if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } else { output = output + "0"; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; } else { output = output + "0"; }
output = ""; if (field["test1"].size() == 5) { output = output + field["test1"][field["test1"].size() - 5]; } if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4] + "."; } if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3]; } if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; } if (field["test1"].size() == 3) { output = "0." + output; } if (field["test1"].size() == 0) { output = "0.000"; }
-Its important that you use “Custom” format for the source field
output = ""; if (field["test1"].size() >= 8) { output = output + field["test1"][field["test1"].size() - 8]; } if (field["test1"].size() >= 7) { output = output + field["test1"][field["test1"].size() - 7]; } if (field["test1"].size() >= 6) { output = output + field["test1"][field["test1"].size() - 6]; } if (field["test1"].size() >= 5) { output = output + field["test1"][field["test1"].size() - 5]; } if (field["test1"].size() >= 4) { output = output + field["test1"][field["test1"].size() - 4]; } else { output = output + "0"; } output = output + "."; if (field["test1"].size() >= 3) { output = output + field["test1"][field["test1"].size() - 3]; } else { output = output + "0"; } if (field["test1"].size() >= 2) { output = output + field["test1"][field["test1"].size() - 2]; } else { output = output + "0"; } if (field["test1"].size() >= 1) { output = output + field["test1"][field["test1"].size() - 1]; } else { output = output + "0"; }
if (number(field["overtime"]) == 0) { output = "OT" } else { output = "" }
Since “O” looks like “0” (zero), we can recognize it, so you need to mark only the first letter of word “OVERTIME”.
If need any help with creating your custom script, just send us an email to ocr@scoreboard-ocr.com