display dialog "iTunesで選択した曲の「アルバム(読み)」項目に年を入力します" buttons {"NO", "OK"} default button 2 set button_a to button returned of result if button_a = "OK" then --iTunesのスクリプト tell application "iTunes" try set selectionList to selection repeat with theTrack in selectionList set original_year to year of theTrack set original_album to album of theTrack set new_tag to (original_year & original_album) as string set sort album of theTrack to new_tag end repeat on error display dialog "エラー発生" buttons {"OK"} default button 1 end try end tell display dialog "終了" buttons {"OK"} default button 1 end if