Hi,
I’ve written my first applescript automator application, it extracts artwork from iTunes into individual image files.
It works! Almost
The image files are created on disk but I can’t work out how to pass them as output. I can’t find much info on this in Apple’s intro guide http://developer.apple.com/documentation/AppleApplications/Conceptual/AutomatorConcepts/index.html
If I specify com.apple.applescript.text-object under AMProvides in info.plist, I can output text strings. However if this is changed to public.image and use the applescript
set artworkData to (data of artwork 1 of itunesTrack) as picture
set end of output to artworkData
or
set finalartworkFile to (artworkFolder & theName & extension) as string
set end of output to finalartworkFile
it doesn’t work.
When you put another action after it which accepts ‘Image file’, the two don’t link and both ‘Image file’ linkers turn red. It seems likely that there’s something wrong besides the applescript but I must admit this is new to me and I haven’t got a clue.
Does anyone know how to do this properly?
Best regards,
Oliver Kohll