Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes Scripting Bridge examples?



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 (email@hidden)

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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.