Re: newbie: how to get result of "cancel"
Re: newbie: how to get result of "cancel"
- Subject: Re: newbie: how to get result of "cancel"
- From: Frank Watzl <email@hidden>
- Date: Tue, 23 Jan 2001 23:13:09 +0100
Hi,
wrap "choose folder" into a try block and trap error -128 (see below)
Frank Watzl
--begin script
try
set foo to (choose folder)
on error e number n
if n = -128 then -- error -128: user cancelled
set s to "You hit \"cancel\" !"
display dialog s
else--other than -128: display error message
error e number n
end if
end try
--end script
At 13:27 Uhr -0800 23.01.2001, Bret Linford wrote:
>
Hi,
>
>
I know that if I do a "choose folder" and the user hits "cancel" that the
>
script will be killed. How do I get the "result" of a "cancel"? If the user
>
hits "cancel", I would like to have a dialog box that says something like
>
"Installation aborted". Thanks!
>
--
>
Bret
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users