tell application "Finder"
activate
with timeout of 60 seconds
repeat
try
display dialog "入力" default answer ¬
"入力支援" buttons {"タイプ1", "タイプ2", "キャンセル"} ¬
with icon caution ¬
with title ¬
"タイトル" cancel button ¬
"キャンセル" default button ¬
"タイプ2" giving up after 10 without hidden answer
if button returned of the result is "タイプ1" then
set MainFileName to text returned of the result as Unicode text
set dialogObj to "タイプ1をおしました"
else if button returned of the result is "タイプ2" then
set MainFileName to text returned of the result as Unicode text
set dialogObj to "タイプ2をおしました"
else if gave up of the result is true then
set dialogObj to "時間切れになりました"
display dialog (dialogObj) with icon 2
exit repeat
end if
on error errText number errNum
display dialog (errText) & "\nerror number:" & (errNum) with icon 2
exit repeat
end try
end repeat
end timeout
end tell