• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie: how to get result of "cancel"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >newbie: how to get result of "cancel" (From: Bret Linford <email@hidden>)

  • Prev by Date: RE: scripting copy from one filemaker database to another
  • Next by Date: Re: newbie: how to get result of "cancel"
  • Previous by thread: Re: newbie: how to get result of "cancel"
  • Next by thread: Re: newbie: how to get result of "cancel"
  • Index(es):
    • Date
    • Thread