Mailing Lists: Apple Mailing Lists

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

Annotations, AppleScript and .m4a files.



Hi there-

I have a script as follows:

osascript \
                -e "on run argv" \
                    -e "set the_file to POSIX file (get item 1 of argv)" \
                    -e "set the_comment to \"\"" \
                        -e "tell application \"QuickTime Player\"" \
                            -e "launch" \
                            -e "activate" \
                            -e "stop every movie" \
                            -e "close every movie saving no"  \
                            -e "open the_file" \
                            -e "tell movie 1" \
                                -e "set the_annotation to the
annotation \"Comment\"" \
                                -e "set the_comment to (get the full
text of the_annotation)" \
                            -e "end tell" \
                            -e "close movie 1 saving no" \
                            -e "quit" \
                        -e "end tell" \
                    -e "return the_comment" \
                -e "end run" "$FILE"

This works perfectly with .mov and .mp3 files, however it fails with:
execution error: QuickTime Player got an error:
NSReceiverEvaluationScriptError: 4 (1)
when run with a .m4a file.  It seems as though there are no
annoatations available to AppleScript with m4a files, has anyone seen
this issue or know of a workaround?  (I'm open to using iTunes to try
and retrieve the meta data, does anyone have some sample code to do
that?)

thanks,

sugam
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/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.