• 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: Prevent Canceling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prevent Canceling


  • Subject: Re: Prevent Canceling
  • From: Emmanuel <email@hidden>
  • Date: Sat, 28 Oct 2006 11:50:27 +0200

At 12:39 PM -0700 10/27/06, Stockly, Ed wrote:
So, is there anyway to prevent users from canceling a running script? (I used Hypercard or Prefab Plaer as workarounds in OS 9, but can't use them in OS 10.

Except if you using a faceless app, I think you cannot prevent the user from interrupting a script with an error number -128, and the error can happen just after (or sometimes, during) any instruction, so you have to handle explicitly the error everywhere, something certainly not simple.


try
-- do the normal thing
-- have all error traps explicitly forward number -128 errors
-- with lines like: on error s number n, if n = -128 then error s number n
on error number -128
-- handle "user canceled": restart everything from scratch, display insults, etc
end


Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Prevent Canceling (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Unicode text to integer conversion from file data
  • Next by Date: Re: objectspecifiers question (very basic)
  • Previous by thread: Re: Prevent Canceling
  • Next by thread: libTIFF error
  • Index(es):
    • Date
    • Thread