Got it to work. I had some of the variables wrong. Once I got it, I put it into a clock that runs the task for Preview and the Task for program every second. Not sure if it will cause an issue but seems to be working great so far.
------------------------------
Tyler Egnarski
Broadcast Engineer
Titan TV
------------------------------
Original Message:
Sent: 09-16-2022 12:48
From: Tyler Egnarski
Subject: Dashboard api
Our MC-1 does not tally based on router crosspoint changes made outside of the MC-1. This does not allow GPOs to trigger based on changes made to the router. It is also not correctly showing what is in the Program and Preview Bus. While trying to come up with a solution I came across the MC-1 API while making a custom Dashboard Panel. One option is to "Set Program Bus". It gives you a choice for input. These are the buttons on the front of the MC-1 and the buttons do tally based on the Dashboard Command. The First button is Input 0, the second is 1 and so on. The button I tested with was Input 4 and it works perfectly. Then under controls and APIs on the right side of dashboard there is a dropdown for Ogscript. There I can gather a "parameter value". For the parameter I see the MC-1 as a device. under that dropdown there is a one called "Router Status". I noticed that when I changed the router destination for the Program Bus and Preview Bus these number track to the router Inputs. In my case, button 4 is router crosspoint 19. The parameter gathered is "Actual [0]"; That refers to Background A which is the program bus. How do Iayout the script so when the "Actual" reads 19 it switches the "Set Program Bus" to input 4? I am thinking in involves a conditional "If" parameter, I just can't seem to connect the dots correctly. Any ideas? Will this be able to run in the background on dashboard?
------------------------------
Tyler Egnarski
Broadcast Engineer
Titan TV
------------------------------