我希望 iTunes 播放播放列表中每首歌曲的特定 60 秒(比如 60-120 秒)。完成此操作的 AppleScript 代码是什么?到目前为止,我有:
tell application "iTunes"
repeat with i from 1 to count tracks of playlist "My Playlist"
play track i of playlist "My Playlist"
end repeat
end tell
我希望 iTunes 播放播放列表中每首歌曲的特定 60 秒(比如 60-120 秒)。完成此操作的 AppleScript 代码是什么?到目前为止,我有:
tell application "iTunes"
repeat with i from 1 to count tracks of playlist "My Playlist"
play track i of playlist "My Playlist"
end repeat
end tell
尝试:
tell application "iTunes"
set trackCount to count of tracks of playlist "My Playlist"
repeat with i from 1 to trackCount
play track i of playlist "My Playlist"
set player position to 60
repeat until player position ≥ 120
delay 0.5
end repeat
end repeat
end tell