The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run a program after a laptop has been on battery power for x minutes?


  • To: ukha_d@xxxxxxx
  • Subject: Re: Run a program after a laptop has been on battery power for x minutes?
  • From: "Pete Shew" <pete@xxxxxxx>
  • Date: Tue, 10 Feb 2004 10:41:12 +0000
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • References: <c095oh+b5e3@xxxxxxx>
  • Reply-to: ukha_d@xxxxxxx

In Windows, you can check the powers status in Win32 using
GetSystemPowerStatus. This could be polled or in response to a
WM_POWERBROADCAST message with wParam set to PBT_APMPOWERSTATUSCHANGE.

I don't know of any product that does this and schedules a task after a
period on battery.

Pete

*********** REPLY SEPARATOR  ***********

On 09/02/2004 at 23:40 alanmiddleton74 wrote:

>Has anyone seen a program that launch another program(s) if a laptop
>has been on battery power for x minutes? x is going to be a small
>period of time like 20 minutes.
>
>I'm trying to use the battery like a ups, so it will normally run on
>mains, if the power fails the laptop will run off of battery for x
>minutes, then run some programs and then go into a controlled
>shutdown assuming the power hasn't resumed since then.
>
>I know I can run a program if the battery fall below x% within the
>windows power options but I was after a timed event (perfectionist
>that I am). I also wanted to only run the program some of the time as
>opposed to all of the time / having to import and export registry
>settings to change it automatically.
>
>I need to solve this problem for both windows and linux, so idea on
>either/both platforms would be great.
>
>Thanks in advance,
>
>Alan.
>
>
>
>UK Home Automation Meet 2004 - BOOK NOW!
>http://www.ukha2004.com
>
>http://www.automatedhome.co.uk
>Post message: ukha_d@xxxxxxx
>Subscribe:  ukha_d-subscribe@xxxxxxx
>Unsubscribe:  ukha_d-unsubscribe@xxxxxxx
>List owner:  ukha_d-owner@xxxxxxx
>Yahoo! Groups Links
>
>
>


regards, Pete
pete@xxxxxxx



UK Home Automation Meet 2004 - BOOK NOW!
http://www.ukha2004.com

http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe:  ukha_d-subscribe@xxxxxxx
Unsubscribe:  ukha_d-unsubscribe@xxxxxxx
List owner:  ukha_d-owner@xxxxxxx

Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.