• 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: Causing the system to shutdown when the sleep button is pressed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Causing the system to shutdown when the sleep button is pressed


  • Subject: Re: Causing the system to shutdown when the sleep button is pressed
  • From: Donald Hall <email@hidden>
  • Date: Thu, 5 May 2005 21:49:43 -0600

Tom,

I have been looking into this for my scheduling application, Script Timer. You will need to write a scripting addition to register your script application for power events. You can read about scripting additions here:

http://developer.apple.com/technotes/tn/tn1164.html

As for power management examples, look on the Apple developer's site for PM_DDK_1.0_for_Mac_OS_X

Hope that helps,

Don

At 9:39 PM -0600 2005/05/05, tom Berry wrote:
I'm coding a music playing front end using AS for use by hobbyists in
their automobile.  The Mac Mini has finally brought the Apple platform
to the car in a cheap and small package and generated a lot of
excitement in the hobbyist comunity.

Trouble is that power supplies that operate in the car that are
suitable for the Mac are designed to emulate pressing the power button.
  On the PC, this can be configured to standby, hibernate or shut down
the computer.  On the Mac, it can be set to either sleep the computer
or, if held for 6 seconds, to force a shutdown.

I'd like my application to receive an event from the system when the
power button is pressed and order the system to shut down.  However, I
don't know if this is possible in AS.  I suspect not and that it may
involved the pmset command or even reprogramming the Open Firmware on
the machine.

If it is possible to "register" your Applescript to receive power
events so that it may shut the system down when the power button is
pressed, that solution would be fantastic.  I not, can you direct me to
the proper place to ask this question?

Thanks in advance,

Tom Berry

-- Donald S. Hall, Ph.D. Apps & More Software Design, Inc. email@hidden http://www.appsandmore.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Nice Automator article on O'Reilly
  • Next by Date: Re: Find in Filemaker
  • Previous by thread: Causing the system to shutdown when the sleep button is pressed
  • Next by thread: Re: What is the best way to get the name (without the extension) of a file?
  • Index(es):
    • Date
    • Thread