I need to capture whether a dialog gave up or not.
tellapplication "Finder" display dialog "Do you want to do something?" giving up after 10 if <did give up after 10> then do one thing else do another thing endif
endtell
The result of display dialog is a record, with properties depending on the parameters used, so you can just query the desired value - for example:
Code:
set dialogResult to (display dialog "Do you want to do something?" giving up after 10)
if gave up of dialogResult then
log "I gave up"
else
log button returned of dialogResult
end if
Note that display dialog is a part of StandardAdditions, so you do not need to use the Finder.