Timing our episodes with Meridian and Applescripts

I put together this little screencast of how we plan on using Meridian software with some custom AppleScripts that I wrote that will allow me to automate the starting and stopping of the timers without me having to click all the way over to the timers themselves, which are running on a second display on my Mac. This puts all the scripts in my Applescript menu and lets me launch the timers easily while the jingles are playing for our segments.

We’re just trying this out, and it may not even work, but it was fun to do and I think it has promise. These are my FIRST EVER Applescripts so please be kind. Also, I didn’t have my mic when I recorded this so my voice was recorded on my Macbook Pro’s built-in microphone.

 tell application "System Events"
   get properties
   if UI elements enabled then
    tell process "Meridian"
      click button 1 of window "Show"
      click button 1 of window "Intro"
    end tell
    
   else
     tell application "System Preferences"
       activate
       set current pane to pane "com.apple.preference.universalaccess"
       display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
     end tell
   end if
end tell