• 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: Halt script in progress...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Halt script in progress...


  • Subject: Re: Halt script in progress...
  • From: Matthew Broms <email@hidden>
  • Date: Mon, 12 Jan 2004 11:13:23 -0500

Thanks for the idea, Chris. I'm embarrassed I didn't think of this because
the moment I read it, I knew it would work for this case (and does). My
short-sided thinking was caused by a more complex issue using the same
scenario which is why I had tried using the issuance of a 'Error -128'.
This same solution would not quite have worked as well had I been nested two
handlers down inside of several loops. I could condition each handler and
each loop to catch the exception, but that's ridiculous and a pain. I just
WISH there was some sort of command that would cause all processing to stop
(like exit) without quitting the application. Of course, there's a lot of
things I wish for in AppleScript :-)

Matt

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


> From: Chris Garaffa <email@hidden>
> Date: Fri, 9 Jan 2004 18:31:35 -0500
> To: Applescript Users <email@hidden>
> Subject: Re: Halt script in progress...
>
> On Jan 9, 2004, at 6:19 PM, Matthew Broms wrote:
>
>> I have an AS Studio app that repeats through a large folder processing
>> images which can take several hours. The user selects a source folder
>> and a
>> destination folder. I9ve put a 3Stop2 button into my interface so if
>> they
>> change their mind and want to perform another task in the program, or
>> change
>> either folder paths and start over. If they click on this button a
>> display
>> dialog appears pausing the process. How do I tell the entirely
>> separate
>> repeat loop from a different handler to just stop doing it9s thing?
>> Can it
>> be done? I9ve tried inserting an error -1289, but nothing happens.
> I've never done this, but here's an idea to try:
> Have a global variable, for example gShouldStopRoutine. Set it to
> false. Since you say you have a repeat loop, enter this code:
> if (gShouldStopRoutine is true) then
> exit repeat
> end if
>
> Now, when the stop button is clicked, change gShouldStopRoutine to true
> and you should be all set. Hope that works out!
>
> --
> Chris Garaffa
> email@hidden
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Halt script in progress... (From: Chris Garaffa <email@hidden>)

  • Prev by Date: Re: digit not followed by a period
  • Next by Date: Re: digit not followed by a period
  • Previous by thread: Re: Halt script in progress...
  • Next by thread: Acrobat out of bounds again...
  • Index(es):
    • Date
    • Thread