Question about Applescript vs. Objective-C

I’m thinking about writing a program. I know a little Applescript and have some experience writing scripts (PHP developer for 5 years). I’m trying to decide if I should learn Objective-C, or just go ahead and use Applescript.

What are the cons of using Applescript vs. Objective-C? Does it really matter if I write the app in Applescript?




if your app is going to communicate with other apps and is not time critical (like parsing a hugh database) or thread critical (like using background processes), AppleScript is a good choice.

In all other cases Objective-C is preferable.

But consider, even if you have experience in scripting languages, Objective-C is much more than a scripting language and it takes a long time to learn.

I’d like it to interact with a website using REST protocols and write meta tags to m4v files. Objective-C then? :slight_smile:

For the web part I recommend ObjC. If you want to write the tags with iTunes, you can use Scripting Bridge or in Snow Leopard you can write everything in AppleScriptObjC

Also consider Python or Ruby, which aside from being higher-level languages like AppleScript also often have existing libraries for these sorts of tasks. That may significantly shorten your learning and development times. Plus they have very good Cocoa bridges themselves, should you wish to slap a GUI on top. Not that acquiring ObjC skills is a bad thing either (e.g. I’ve picked up AppleScript, Python, Ruby and ObjC over the year), and learning new languages and techniques tends to improve your abilities in the ones you already know. What’s best for you at the moment just depends on what your priorities and requirements are.