[Mono-osx] Access iTunes using C#

Bart Masschelein masschel at gmail.com
Thu Jan 17 14:35:52 EST 2008

...and may I add to this, after a bit of reflection, that in the end  
it may be better to stick to mere AppleScript for everything, and hop  
back when things are more mature. I'm a bit reluctant to learn  
ObjectiveC, which would be yet another syntax to push in my brains.

Apple has no plans to drop ObjectiveC in favor of C# in the near  
future, I guess :-)

On 17 Jan 2008, at 20:09, Geoff Norton wrote:

> Right now there isn't much there.  However the new ScriptBridge  
> stuff combined with objc2 bindings I'm currently working on could do  
> this (assuming you actually can do the manipulation you want thru  
> applescript).
> Take a look at:
> http://developer.apple.com/releasenotes/ScriptingAutomation/RN-ScriptingBridge/index.html
> We could likely write a similar tool to sdp (or a post-processor; or  
> simbl; or something) to do the conversion to a C# class then you  
> could do things like
> iTunesApplication itunes =  
> SBApplication.ApplicationWithBundleIdentifier ("com.apple.iTunes");
> Console.WriteLine (itunes.CurrentTrack.Name);
> This is all off the top of my head tho (I havn't looked into how  
> feasible hacking sdp to that would be; you might need to manually  
> bind all that).
> Also my objc2 bindings are far from complete at this stage, no ETA  
> on when they'll ship yet.
> Today you could bind NSAppleScript as mentioned in the other e-mail
> -g
> On 17-Jan-08, at 1:56 PM, Bart Masschelein wrote:
>> Hi all,
>> I was wondering if there is a way to access iTunes using Mono/C#. I
>> know there is an SDK for Windows available, but is there as well an
>> SDK for OSX? It would be rather strange if not, no? I'm not
>> particularly interested in controlling iTunes (play/stop/pause/next
>> song/etc) but rather in importing songs, changing the tags etc. The
>> ultimate idea is to synchronize between a local iTunes library and a
>> remote iTunes on another Mac. Reading the xml library file alone will
>> not do, since I would also like to actually change the library, and
>> add/remove songs. I know I could do those things using AppleScript,
>> but I am more the platform independent kind of guy, in love
>> with .NET ;-).
>> cheers,
>> Bart
>> _______________________________________________
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-osx

More information about the Mono-osx mailing list