HOW TO: Control OnTheAir Switch from OnTheAir Video

As with all secondary events, OnTheAir video controls external devices using "Actions". Actions are AppleScripts that are saved in the folder "Actions" that is located in the same folder as the OnTheAir Video application. These AppleScripts used for Actions must be formated a little differently then a standard AppleScript.

For example a standard AppleScritp to control OnTheAir Switch (that you can use to control OnTheAir Switch from iCal for example), would be formated like this (this will control the video router so that the source of output 1 is the input 2):

tell application "OnTheAir Switch"

set input of output 1 to 2

end tell


But if you place this AppleScript in the "Actions" folder of OnTheAir Video, nothing will happen because the Actions AppleScripts should be formatted as this :

on Action(parameter)

ignoring application responses

tell application "OnTheAir Switch"

set input of output 1 to 2

end tell

end ignoring

end Action


If you try to run that AppleScript out of OnTheAir Video, you'll see that nothing will happen because the condition "On Action" will never be met.


Also, you can use the parameter variable which can be used if you want to send the information from OnTheAir Video :

on Action(parameter)

ignoring application responses

tell application "OnTheAir Switch"

set input of output 1 to (parameter)

end tell

end ignoring

end Action

In the OnTheAir Video parameter column, in the Actions window you will then have to enter the number of the source input that you want to assign to output 1 (see screenshot attached)



Do not forget that AppleScripts Actions can be combined, so you have only one AppleScript that does different things. For example you could have one "LIVE Start" Action which all at once will do different things: 

  • Switch the Video router to the LIVE source
  • Start MovieRecorder so it records the Live
  • Start a CG project with a RSS feed that you want to show during the Live


And if you have any question, do not hesitate to contact us, we'll be glad to help you build the Action that you need.

Have more questions? Submit a request