*******************************************************************************
Author: Vijay Kumar Pulivarthi
*******************************************************************************


Battery Alert

Once your laptop or notebook battery is down, you charge it pretty immediately. But most of them(hmm .. i guess everyone) leave it plugged and forget to unplug the cable even after the device is charged completely. I've been there too. Result of this ? a new battery.

When you leave your laptop plugged for a long time, your battery stamina decreases. Not rapidly but gradually overtime. This leads you to buy a new battery. What if you had a simple piece code that runs just to track the level of your battery while charging.

Here is that piece of code(technically, a VB Script) that can track the percentage of charging of your device. This is how it works:

  1. Download the file provided below named "Battery Alert.md".
  2. Right click on the file and open it with your favourite text editor. Notepad can get the work done too.
  3. Now save it with "Save as" option. Give it any name you want and save it with .vbs extension.
  4. Change "save as type" to "All files". Click "save".
  5. Now move this file to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\" into StartUp folder. When you restart your computer the file initiates from the StartUp items.
  6. Restart your laptop. The script is ready to work.

The script is set to default of 95%. If your laptop reaches 96% the script throws you an alert indicating to unplug the device. You can modify the script to specify the level you want to be notified with an alert. To do this, go to the StartUp folder and open the script with any text editor and change the values where it says "ipercent > 95". Set the value according to your need. Vola! you are all set now. Enjoy your day.


Download:

Battery Alert.md

Screenshot: