Potential dangerous wake on lid opening
Potential dangerous wake on lid opening
- Subject: Potential dangerous wake on lid opening
- From: Axel Luttgens <email@hidden>
- Date: Mon, 03 Nov 2003 09:58:59 +0100
I was quite worried with a new PowerBook, as it's lid tended to open
during transportation, thus provoking a system wake; the worrying part
being that the hard disk then starts to spin.
Now, the system preferences do not (yet?) allow to control the
computer's wake upon lid opening.
So, for those who might be interested, I quickly (and dirtyly) wrote
following small script and saved it as an application:
try
set lidwake to do shell script "pmset -g live | grep 'lidwake'"
on error
display dialog "This computer dosent' understand anything about
waking and lids..." buttons "Oh!"
error number -128
end try
if word 2 of lidwake is "1" then
display dialog "This computer presently wakes on lid opening."
buttons {"Disable wakening", "Seen"}
if button returned of result is "Disable wakening" then do shell
script "pmset -a lidwake 0" with administrator privileges
else
display dialog "This computer presently doesn't wake on lid
opening." buttons {"Enable wakening", "Seen"}
if button returned of result is "Enable wakening" then do shell
script "pmset -a lidwake 1" with administrator privileges
end if
Nothing great, but proved very useful.
HTH,
Axel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.