• 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: Chris Garaffa <email@hidden>
  • Date: Fri, 9 Jan 2004 18:31:35 -0500

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.

  • Follow-Ups:
    • Re: Halt script in progress...
      • From: Matthew Broms <email@hidden>
References: 
 >Halt script in progress... (From: Matthew Broms <email@hidden>)

  • Prev by Date: Halt script in progress...
  • Next by Date: Re: Folder Actions and BBEdit problem this time without HTML
  • Previous by thread: Halt script in progress...
  • Next by thread: Re: Halt script in progress...
  • Index(es):
    • Date
    • Thread