Scheduling a "sleep" event on Power Manager I am using Mac OS El Capitan on my macbook pro and have just installed Power Manager following your recommendations elsewhere on this website (see Low Battery Alert for Mac OS X El Capitan). 

However, I see only an option to power down the computer when the battery charge falls below a specified level. I would like to simply display a pop-up warning on the screen along with a sound alarm and, if continued unheeded for a few minutes, put the laptop to sleep instead of powering down. I guess the way to achieve this would be a script; could you send me such a script indicating wherever I have to insert my preferred parameters? Thanks.
Below are the steps to creating an event to run an AppleScript when the battery level drops below 30%:


Power Manager > File (menu) > New Empty Event;
Double-click new Untitled event to open in editor;
Add a trigger > Power Remaining > Battery 30% Left
Add an action > Run Script > AppleScript
AppleScript action > Cog > Edit
Copy and paste in the AppleScript below
Apply then Save


AppleScript to copy and paste into event:

#!/usr/bin/osascript
try
    with timeout of 10 seconds
        display dialog "Your battery has dropped below 30%" with icon caution buttons {"OK"} default button 1
        say "Low battery" 
    end timeout
on error -- likely timeout
    tell application "Finder" to sleep
end try


I wrote Power Manager. If you need support for Power Manager, please get in touch via support@dssw.co.uk.