wake from sleep
BNig
niggemann at uni-wh.de
Tue Aug 11 14:46:20 EDT 2009
Tom,
I dont know about shell but I found a way to query whether the screensaver
is on or not. You would have to query the screensaver repeatedly with a
script though.
I found the basics on macscripter.net
to try it out:
--------------
delay 4 -- to let the screensaver start
tell application "System Events" to set v_proclist to name of every process
set myScreen to false
repeat with aProcess in v_proclist
if (aProcess is in {"ScreenSaverEngine"}) then
set myScreen to true
say "yes, screen saver is on"
end if
end repeat
if not myScreen then say "no screesaver is running"
-----------------
to make a script you query in a send in time fashion every second or so
-------------------
tell application "System Events" to set v_proclist to name of every process
set myScreen to false
repeat with aProcess in v_proclist
if (aProcess is in {"ScreenSaverEngine"}) then
set myScreen to true
return myScreen
end if
end repeat
return myScreen
------------------
regards
Bernd
Thomas McGrath III-3 wrote:
>
> Is there a simple way to tell via a script when the system wakes from
> sleep or when it wakes from screensaver?
>
> I have (on Mac) my screensaver set to require password on wake and
> would like my stack to do something when it wakes.
>
> I tried a small applescript in the loginItems in Preferences but that
> is only on login and not when it wakes from sleep/screensaver.
>
> Maybe a shell command????
>
>
> Thanks
>
>
> Tom McGrath III
>
--
View this message in context: http://www.nabble.com/wake-from-sleep-tp24917002p24923490.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list