osascriptコマンドのエラーメッセージ(Adobe Unit Types.osax)
2015-10-06 補足
OS X 10.11では、/Library/ScriptingAdditions/の下が空だった。
YosemiteのターミナルでiTunesを操作しようとしたら、妙なエラーメッセージが出た。(動作自体は正常に行われる。)
$ osascript -e 'tell application "itunes" to play' osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist. $
検索してみると、64bitではなく32bit版が入っているようだ。手順に沿って新しいものに入れ替えたらメッセージが出なくなった。
https://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html
以下は試行錯誤していたときのログ。
(1. 初期状態) $ osascript -e 'tell application "itunes" to play' osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist. $ arch -i386 osascript -e 'tell application "itunes" to playlist' arch: posix_spawnp: osascript: Bad CPU type in executable $ arch -x86_64 osascript -e 'tell application "itunes" to play' osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist. $ (2. バージョンa2.1.0に入れ替えたらメッセージが出なくなった。) $ osascript -e 'tell application "itunes" to stop' $ osascript -e 'tell application "itunes" to play' $ osascript -e 'tell application "itunes" to playlist' playlist $ osascript -e 'tell application "itunes" to stop' $
どうしてYosemiteに古いものが入っているのか不思議。
【オリジナル 】
【最新版(といっても2009年)】
マルチユーザーで使う場合はアクセス権を直さないといけないのかな。(未検証)
環境
OS X 10.10.5