I'm wondering if there's a simple way to use one AppleScript program to turn something on and off. Basically I want it to do this.
Check current pmset sms
if sms = 0
then
do shell script sudo pmset -a sms 1
if sms = 1
then
do shell script sudo pmset -a sms 0
How would I tell it to check the current value?