フォルダ内のファイルを追加または更新するスクリプトがあります。私がやりたいのは、AppleScriptがこれらのファイルをiTunesに追加することです。しかし、私はディレクトリをループすることができないようです。
tell application "iTunes"
if playlist myPlaylist exists then delete playlist myPlaylist
set newPlaylist to (make new user playlist with properties {name:myPlaylist})
repeat with theFile in myPath as list
add theFile to playlist myPlaylist
end repeat
end tell
繰り返すたびに、theFileの値はmyPathの個々の文字であり、myPath内の実際のファイルではありません。theFileは、file1.mov、file2.mov、..の代わりにM、a、c、i、n、...になります。
ありがとうございました。