ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Alarm When Power Cord Falls Out of Notebook

<< < (2/3) > >>

Darwin:
I should have been more explicit - I was suggesting that the functionality that is built into my Gateway (and nitemonkey's brother's Compaq - it occurs to me that this might be an Intel vs. AMD thing, or a Centrino thing? as my wife's Compaq is an Athlon 64+) would be a great way to accomplish what Kruskal is after. I *think* that this must be a BIOS setting or an OS feature and not a software install and in my world it's always nice to accomplish these things without having to resort to installing anything.

I'm a complete dimwit when it comes to coding so I may be right out to lunch on this....

Laughing Man:
It's probably do your settings regarding battery life. I have three options to choose from, little power usage, balanced, and high performance. Which..they really don't change much but the screen brightness. So I leave my laptop on balanced. What happens when the power cable is plugged in, is the laptop detects that it's getting power so it switches it to high performance (hence my screen at full brightness).

Oh and I have a Centrino. To add any possible information.

skrommel:
:) Here a simple command line utility.

BatteryRun - Run commands when the power plug is connected or disconnected.

Command line:
  BatteryRun.exe "<connect command>" "<disconnect command>"
Example:
  BatteryRun.exe "ding.wav" "calc.exe"

You'll find the downloads and more info at 1 Hour Software by Skrommel.

For multiple actions, I suggest making an AutoHotkey script.

Skrommel

Kruskal:
:) Here a simple command line utility.

BatteryRun - Run commands when the power plug is connected or disconnected.

Command line:
  BatteryRun.exe "<connect command>" "<disconnect command>"
Example:
  BatteryRun.exe "ding.wav" "calc.exe"

You'll find the downloads and more info at 1 Hour Software by Skrommel.

For multiple actions, I suggest making an AutoHotkey script.

Skrommel

-skrommel (May 27, 2007, 07:05 PM)
--- End quote ---
That's fantastic!  May I ask what the basic hook you used is?

I note that you left it as an exercise for the reader to figure out how to simply play a WAV file.  Putting the WAV file as a command, as you suggest, brings up the Media Player UI.  I found many discussions about how to simply play a WAV file from, say, a BAT file which concluded that you can't.  But one lead me to SNDREC32 used, I think, to make recordings.  SNDREC32 /PLAY /CLOSE /EMBEDDING Sound.WAV will simply play a sound -- no UI or other irrelevances.  It does take a long time to play -- I'd still like a simple and FAST WAV player.

So the entire Target of my BatteryRun shortcut is:

"C:\Program Files\Utilities\BatteryRun.exe" "C:\WINDOWS\system32\sndrec32.exe /play /close /embedding C:\WINDOWS\Media\tada.wav" "C:\WINDOWS\system32\sndrec32.exe /play /close /embedding C:\WINDOWS\Media\Windows XP Battery Critical.wav"

Thanks -- Vincent

skrommel:
 :) It's kind of simple, I think it needs a proper options screen, but I only had an hour last night.

It uses GetSystemPowerStatus, so a lot more alarms can be added, like battery low, 70% recharged, or whatever.

I've added automatic WAV and MP3 detection to BatteryRun v1.1.

Skrommel

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version