• 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
Loop Until Quit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loop Until Quit


  • Subject: Loop Until Quit
  • From: Marconi <email@hidden>
  • Date: Wed, 14 Nov 2007 18:02:27 -0700

What's the best construct to simply loop continuously until the script (app) is quit. That is, upon launch:

Initialize some stuff

repeat
	do something
	delay xx
end repeat

There is no condition to check to see if the repeat is due. It's desired that it repeat as long as the script.app is running.


The script.app could either be quit from Finder or maybe it could put up a dialog and while idle, check to see if the dialog's Quit button is clicked.


Is it OK to repeat unconditionally or should I:

repeat while true -- always true!
	do something
	delay xx
end repeat

Or should I use some other looping construct?



_______________________________________________
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/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Loop Until Quit
      • From: Brian Johnson <email@hidden>
  • Prev by Date: Scripting Brightnes
  • Next by Date: Re: Loop Until Quit
  • Previous by thread: Scripting Brightnes
  • Next by thread: Re: Loop Until Quit
  • Index(es):
    • Date
    • Thread