on open DropObj repeat with ObjFiles in DropObj tell application "Finder" display dialog "変更後のファイル名を入力" default answer "" buttons {"Rename", "RenameDate","Cancel"} with icon 1 default button 1 if button returned of the result is "RenameDate" then set MainFileName to text returned of the result as Unicode text set the NameSelect to "2" as Unicode text else if button returned of the result is "Rename" then set MainFileName to text returned of the result as Unicode text set the NameSelect to "1" as Unicode text end if end tell end repeat end open