• 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: Why won't this quit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why won't this quit?


  • Subject: Re: Why won't this quit?
  • From: Steve Mills <email@hidden>
  • Date: Wed, 02 May 2018 16:31:09 -0500

> On May 2, 2018, at 16:05:03, Gil Dawson <email@hidden> wrote:
>
> Why won't this quit?
>
> logsome(return & "Starting" & return)
>
> repeat -- forever
>       logsome("Doing... " & time string of (current date) & return)
>       delay 20
> end repeat
> return

Because you're stuck in an infinite loop. Use an idle handler instead.

on idle
        log "idling"

        return 20
end idle

You might also want to put any initial setup in a run handler instead of it
just hanging out in the main body. Mostly for neatness.

on run
        log "starting"
end run

--
Steve Mills
Drummer, Mac geek

 _______________________________________________
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:
    • Where do the errors go?
      • From: Gil Dawson <email@hidden>
    • Re: Why won't this quit?
      • From: Gil Dawson <email@hidden>
References: 
 >Why won't this quit? (From: Gil Dawson <email@hidden>)

  • Prev by Date: Why won't this quit?
  • Next by Date: Re: Why won't this quit?
  • Previous by thread: Why won't this quit?
  • Next by thread: Re: Why won't this quit?
  • Index(es):
    • Date
    • Thread