Newbie needs help getting started with script

When Retrospect automatically quits upon completion of backup, I would like Bulldog to launch and shut down the OS and UPS.

  1. Retrospect quits
  2. Bulldog app launches
  3. Select Bulldog Control menu
  4. Select Shutdown now menu item in the Control menu
  5. In the resulting “Shutdown now” window, select the “Shutdown OS and UPS” radio button
  6. Click OK

I have searched for a similar script to help myself get started, but can’t seem to find anything. Any help will be greatly appreciated.