• 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: quitting an applet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quitting an applet


  • Subject: Re: quitting an applet
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 11 Jan 2001 10:53:48 -0500

>AppleScript isn't multi-threaded and doesn't handle Apple Events and also
>run at
>the same time. You need to get rid of the repeat loop, and let the idle
>handler
>do the looping for you. That way, when other scripts send Apple Events to
>your
>script application, its applet shell will be able to receive the event and
>dispatch it or handle it properly. (Note that telling a script
>application to
>set one of its properties is just like sending a command to a "set"
>handler of
>the script. Its just that the "set" handler is built in to the applet
>shell and
>so doesn't appear in your script.)
>
>So, your script would look like this.
>
> on idle
> -- do your stuff here
> if some property is false then quit
> return 1 -- time to wait for next idle loop
> end idle

thanks ..Does this mean that I write my script

init stuff (that runs one time)

on idle
everything else

end idle

and I save this as a stay open or normal applet?

tia

Doug


  • Prev by Date: Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1
  • Next by Date: load script w/ 9.1
  • Previous by thread: Re: quitting an applet
  • Next by thread: Re: quitting an applet
  • Index(es):
    • Date
    • Thread