Setting iTunes album art with ScriptingBridge
Setting iTunes album art with ScriptingBridge
- Subject: Setting iTunes album art with ScriptingBridge
- From: "Dave Verwer" <email@hidden>
- Date: Wed, 27 Feb 2008 13:55:48 +0000
I am trying to set album art for an iTunesTrack obtained using
ScriptingBridge and really getting nowhere with it.
I have cobbled the following code together from various sources and
code examples on the web:
http://pastie.caboo.se/158088
Note that in the code sample, "file" is an NSString containing the
path to an m4a file and "artwork" is an NSImage containing a JPG
loaded with initWithContentsOfURL.
Unfortunately, I get the following error message when that executes:
Apple event returned an error. Event = 'core'\'crel'{
'kocl':0x00000000, 'insh':'insl'{ 'kobj':'obj '{ 'want':'cArt',
'from':'obj '{ 'want':'cFlT', 'from':'obj '{ 'want':'cLiP',
'from':'obj '{ 'want':'cSrc', 'from':'null'(), 'form':'ID ',
'seld':42 }, 'form':'ID ', 'seld':7095 }, 'form':'ID ', 'seld':28141
}, 'form':'indx', 'seld':1 }, 'kpos':'befo' }, 'prdt':{
0x00000000:'utxt'("data") } }
Error info = {
ErrorNumber = -1708;
}
Error -1708 is "Event wasn't handled by an Apple event handler".
I have tried so many things to get this to work, I just cant make any progress.
Anyone got any ideas?
Thanks
Dave
--
e-mail: email@hidden
web: http://shinydevelopment.com
Shiny Development Ltd. is registered in England, Registration Number:
05805802. Registered Office: 4 Claridge Court, Lower Kings Road,
Berkhamsted, Herts., HP4 2AF.
_______________________________________________
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:
This email sent to email@hidden