我正在尝试制作一个脚本来获取当前歌曲的持续时间,但是当我这样做时,持续时间会返回为“缺失值”。有什么建议么?
tell application "iTunes"
if player state is playing or player state is paused then
set theDuration to (get duration of the current track)
display dialog theDuration
end if
end tell