0

AppleScriptを使用するAutomaterワークフローを作成しようとしています。ワークフローは2つのトラックを取得し、それらを次のスクリプトに渡します。

on run {input, parameters}
     set artwork of item 1 of input to artwork of item 2 of input
     return input
end run

スクリプトで1つのトラックからアートワークを取得し、それを別のトラックに適用しようとしています。ただし、実行すると次のエラーが発生します。

記述子タイプの不一致が発生しました。

どんな助けでも大歓迎です。

4

1 に答える 1

0

アプリケーションを指定する必要があります。これを試して :

on run {input, parameters}
    if (count input) > 1 then
        set t2 to (item 2 of input)
        tell application "iTunes"
            if artworks of t2 is not {} then
                set data of artwork 1 of (item 1 of input) to (get raw data of artwork 1 of t2)
            end if
        end tell
    else
        display dialog "Select two tracks first..." buttons {"OK"} cancel button 1
    end if
    return input
end run
于 2012-06-14T09:29:46.990 に答える