• 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: Running Stay-open scripts from the command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Stay-open scripts from the command line


  • Subject: Re: Running Stay-open scripts from the command line
  • From: Michael Ellis <email@hidden>
  • Date: Sat, 19 May 2001 21:34:35 -0400

>On 19/05/2001 at 19:44 -0400, Michael Ellis said:
>>In Mac OS X, if you run a stay-open script using the "/usr/bin/osascript"
>>command, the script loads and immediately quits. The "on idle" handle
>>does not get invoked. Must stay-open scripts be run from the Finder?
>
>Is there a run handler? I wouldn't expect a script to invoke an on idle
>handler when executed from the command line, but maybe I'm missing
>something.
>
>
>--
>

The AppleScript Language Guide refers to several handlers that can be
called automatically:

"on open"
"on run"
"on idle"

If you implement an "on idle" handler, it will be called (by default)
every 30 seconds while your "Stay Open" script is running. This works
fine for scripts launched from the Finder. However, when executing from
the command line, I find that "osascript" terminates immediately and
never calls my "on idle" handler. The expected behavior was for
"osascript" to "stay open".

Of course, this testing is all done under Mac OS X 10.0.3.

-Mike Ellis



==========================================================================
Michael Ellis Phone: 941-377-5562 x5169
Systems Analyst Manager FAX: 941-377-5590
Medical Education Technologies, Inc. (METI) Internet: email@hidden


  • Prev by Date: Scripting For Eudora X
  • Next by Date: Re: Scope of globals, parents and children, "load script" and all that jazz
  • Previous by thread: Re: Running Stay-open scripts from the command line
  • Next by thread: Re: Running Stay-open scripts from the command line
  • Index(es):
    • Date
    • Thread