• 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: Restarting OSX through applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restarting OSX through applescript


  • Subject: Re: Restarting OSX through applescript
  • From: Sander Tekelenburg <email@hidden>
  • Date: Sun, 31 Mar 2002 04:31:56 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 00:18 +0000 UTC, on 31-03-2002, Mr Tea wrote:

> This from Sander Tekelenburg - dated 30/3/02 05.17 pm:

["get execution state"]

>> My approach works perfectly well with "restarting", but it does not work
>> with "quitting". After all other Shutdown Items have quit, this stay-open
>> applet just stays open and the machine is never shut down.
>
> Hi, Sander.
>
> My approach to this is simple. If items in the shutdown items folder are
> being activated, then one of two things is happening - the machine is
> either restarting or shutting down. I only check to see if the 'execution
> state' is restarting. If it's not, then the machine must be shutting down.

Yes, I had considered that, but in my experience that approach is not
reliable. In my earlier tests, I found that sometimes the Finder would still
claim to be "running", and only a second later would it return "restarting" -
that's why I have the "get execution state" in an on idle handler.

[...]

> Also, I don't like to put loads of stuff in my startup and shutdown items
> folders. I just use a single script in each, and use commands in the
> scripts to launch/open other items as required, even if it's just a matter
> of
> telling the Finder to open everything in another specified folder.

I like to be able to switch start-up sets. In one set I need ceratin
startup/shutdown items. In another set, I need others. Having 1 script handle
everything would make that difficult.


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPKaDI+sywKfXgqKdEQKjDwCgpgRpO+h1VaX1HauAWyMg8lZNgH8An2WY
XKZylWnRFyWMiwg7MjMboigM
=zQ11
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
_______________________________________________
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.

References: 
 >Re: Restarting OSX through applescript (From: Mr Tea <email@hidden>)

  • Prev by Date: Re: Restarting OSX through applescript
  • Next by Date: Re: Shell script date & time coercions...
  • Previous by thread: Re: Restarting OSX through applescript
  • Next by thread: Re: Restarting OSX through applescript
  • Index(es):
    • Date
    • Thread