Does anyone have any examples of using the Scripting Bridge with
iTunes? Specifically how you get the currently selected tracks
returned as an array of iTunesTrack items.
FYI, appscript's ASTranslate tool is pretty good at converting
application commands from AppleScript to ObjC syntax, e.g.:
tell application "iTunes"
selection
end tell
produces:
#import "ITGlue/ITGlue.h"
ITApplication *itunes = [ITApplication applicationWithName: @"iTunes"];
ITReference *ref = [itunes selection];
id result = [ref getItem];
which you can then clean up or rewrite into whatever form you need.
Won't help you with SB specifically, of course, but I think my views
on SB are sufficently recorded by now.
If you need any specific help with iTunes' scripting interface, best
ask on applescript-users or go have a rake through <http://dougscripts.com/itunes
> for existing examples.