Scott Anguish wrote:

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.

HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to