I would like to access a couple of different Mac OS X applications from preferably Ruby, but I would settle for PHP. The applications are Elgato's turbo.264 and Apple's iTunes. Both have Applescript Libraries defined that would allow me to do what I want to do from Applescript, but I don't want to do this in Applescript. If I can't do this in Ruby or PHP, perhaps I can do it in objective C / Cocoa and create some kind of wrapper that I could call from Ruby.
Is this even possible? It seems like if the methods are available in Applescript they should be available in other languages, I have just not been able to find anything.