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 set theAliasName to ObjFiles as alias set theAliasPassName to theAliasName as Unicode text set theFileName to name of ObjFiles as Unicode text set theExeName to name extension of ObjFiles as Unicode text end tell end repeat end open