Scheduling a "sleep" event on Power Manager
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.