0

我正在尝试制作一个使用 AppleScript 的 Automater 工作流程。工作流获取两个轨道并将它们传递给以下脚本:

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

我试图让脚本从一首曲目中获取艺术品并将其应用于另一首曲目。但是,运行时出现以下错误:

发生描述符类型不匹配。

任何帮助是极大的赞赏。

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 回答