----オブジェクトのドロップ=始まり on open DropObj ---繰り返しの始まり repeat with ObjFiles in DropObj ----Finderを呼び出します tell application "Finder" ----ダイアログを出してファイル名を聞きます。 display dialog "変更後のファイル名を入力" default answer "" buttons {"Rename", "RenameDate","Cancel"} with icon 1 default button 1 ----もし押したボタンが『RenameDate』なら if button returned of the result is "RenameDate" then ----『MainFileName』にダイアログの答えをテキストで格納 set MainFileName to text returned of the result as Unicode text ----そして『NameSelect』に2を入れる set the NameSelect to "2" as Unicode text ----もし押したボタンが『Rename』だったら else if button returned of the result is "Rename" then ----『MainFileName』にダイアログの答えをテキストで格納 set MainFileName to text returned of the result as Unicode text ----そして『NameSelect』に1を入れる set the NameSelect to "1" as Unicode text end if ----『theAliasName』として『エリアス』としての名前を格納して set theAliasName to ObjFiles as alias ----その『theAliasName』をテキスト形式に変換 set theAliasPassName to theAliasName as Unicode text ----『theFileName』としてファイル名をテキストとして格納 set theFileName to name of ObjFiles as Unicode text ----『theExeName』拡張子をテキストとして格納 set theExeName to name extension of ObjFiles as Unicode text ----Finderの終わり end tell ----繰り返しの終わり end repeat ----ドロップの終わり end open