Archive for the ‘Leopard’ Category
September 21 '09 - 5:40 pm
I’ve been keeping an eye on Google Analytics to track the operating systems of visitors to help me determine who I should be writing AppleScripts for. Looking at August 28 (SL’s debut) thru September 20 (about 90k visits):
- Intel 10.6 – 44.38%
- Intel 10.5 – 43.91%
- PPC 10.5 – 4.0%
- Intel 10.4 – 3.04%
- PPC 10.4 – 2.84%
To put a finer point on it, here are the stats for the week September 13 thru September 20 (about 25k visits):
- Intel 10.6 – 52.24%
- Intel 10.5 – 36.54%
- PPC 10.5 – 3.83%
- PPC 10.4 – 2.90%
- Intel 10.4 – 2.72%
I think I can pretty much drop explicit support for Tiger and PPCs. Snow Leopard adoption appears to be somewhat brisk, which is fine by me because I’ve been writing stuff on two machines running Leopard and Snow Leopard respectively and it’s making my brain hurt.
posted in Leopard, Snow Leopard
September 6 '09 - 8:21 pm
If you’ve got a script that needs to target QuickTime Player in Snow Leopard you probably really want to target “QuickTime Player 7″. Otherwise, if you target “QuickTime Player” the QuickTime Player X app will run and it doesn’t have the AppleScript Goodness like QTP7. However, if the script also has to run in Leopard, you have to target “QuickTime Player”–without the “7″. But you don’t need to write two scripts.
In OS 10.5 and later you can target an app by its application id. I remember seeing that in the AppleScript Release Notes for 10.5 thinking “Hmm. Now how can I use that” and never really thought of anything. Until I needed to access QTP in both 10.5 and 10.6.
This tell block:
tell application id "com.apple.quicktimeplayer"
-- do something in QuickTime Player
end tell
…will target “QuickTime Player” in OS 10.5 and “QuickTime Player 7″ in OS 10.6. The application id is the same for each, so it makes no difference what their names are. And the AppleScript architecture is virtually the same in both operating systems. (Remember that “QuickTime Player 7″ is an optional install either during installation or from the “Optional Installs” folder on your installation disc.)
“QuickTime Player X” is a drastically different version of the player app and scripts written for QTP7 will not play well with it. However, it is scriptable to a modest extent. Its application id is “com.apple.QuickTimePlayerX” in case you need to target QTPX specifically.
posted in AppleScript, AppleScript Syntax, Leopard, QuickTime, Snow Leopard, Tips and Info