Re: Prevent Canceling
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