0

我有以下代码:

tell application "iTunes"
repeat with thetrack in tracks of playlist "foo"
    set showName to name of thetrack
    set showName to ((characters 17 through -1 of showName) as string)
    set episode ID of thetrack to name of thetrack
end repeat
end tell

我正在尝试将电视节目的剧集 ID 设置为曲目名称。如果我注释掉 set episode ID 行,showName 肯定会设置为正确的字符串。当我尝试实际设置剧集 ID 时,我收到以下错误:

iTunes 出现错误:无法将播放列表“Fitness & Nutrition”的每个曲目的第 1 项的剧集 ID 设置为播放列表“Fitness & Nutrition”的每个曲目的第 1 项的名称。

我承认,我被难住了。

4

1 回答 1

0

尝试:

set episode ID of thetrack to (name of thetrack as text)

因为

return class of name of thetrack --> property

return class of (name of thetrack as text) --> text

在此处输入图像描述

于 2013-01-21T04:32:16.903 回答