This happened to me at the tail end of last week and as a result I've been taking my first serious look at Applescript and Apple's Automator.
One of the things I needed to do was script Google Earth, and being an astronomer, what I really needed to do was be able to flip between Google Earth and Google Sky automatically. Unfortunately there wasn't anything in the Google Earth Action Pack that allowed me to do this, and Google Earth has a fairly thin Applescript dictionary.
Of course with the release of Mac OS X Panther, Apple introduced features into the System Events process which allows AppleScript to perform some actions in applications that have no, or only partial, built-in scripting support.
So I wrote some Applescripts to drive the Google Earth GUI, and allow me to flip between Earth and Sky modes, but people locally found the idea of Applescript to be a bit scary. So I went ahead and turned these scripts into Automator actions.
You'll notice that these actions use an Applescript
delayto wait for image streaming from the server to complete, rather than the built in
GetStreamingProgressfunction. Unfortunately I've not found this function to be terribly reliable, about one time in five it'll get stuck and never report that streaming has completed. This isn't terribly helpful if you need reliable scripts, so I've gone with a
You can download the two automator actions I wrote to switch Google Earth between Earth and Sky modes. If you place these into either
~/Library/Automatorthey will show up automatically next time you run Automator, associated with Google Earth. Remember that because these actions reply on System Events you'll need to enable enable UI scripting in the System Preferences before they'll work for you.