iTunesを使いこなそう!for Mac Part 69at MAC
iTunesを使いこなそう!for Mac Part 69 - 暇つぶし2ch146:名称未設定
09/04/02 22:32:26 ZHi3hY6w0
>>132
名前が同じトラックのプレイリストを作るAppleScript。iTunes7.6.2でテスト。
スクリプトエディタで実行する場合はイベントログは記録しない方が速い。

tell application "iTunes"
set allTrackName to name of every track of playlist 1
set checkedNameList to {}
set dupNameList to {}
repeat with theNameItem in allTrackName
set theName to contents of theNameItem
if checkedNameList contains theName then
if dupNameList does not contain theName then
set end of dupNameList to theName
end if
else
set end of checkedNameList to theName
end if
end repeat
log dupNameList
repeat with theNameItem in dupNameList
try
set theName to contents of theNameItem
set thePlaylist to make new playlist with properties {name:"dup-" & theName}
duplicate (every track of playlist 1 whose name is theName) to thePlaylist
on error msg
log "error:" & msg
end try
end repeat
end tell


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch