wake from sleep

BNig niggemann at uni-wh.de
Wed Aug 12 05:35:44 EDT 2009


Tom,

if you are worried about querying every second or so you could cut down on
querying while the screensaver is not on to lets say every minute. Than as
soon as your stack gets the notice that screensaver is on you change to
query every second, your stack will probably idle when the screensaver is
running anyways.

Unfortunately I dont know any way to hook into the system to get a message
"screensavingEnded"

regards
Bernd


Thomas McGrath III-3 wrote:
> 
> This one seems interesting. I will play around with it. It would be  
> nice to have the awaking of the screensaver initiate the applescript/ 
> rev app.
> 
> Tom McGrath III
> Lazy River Software
> 
> On Aug 11, 2009, at 6:54 PM, BNig wrote:
> 
>>
>> Tom,
>> even shorter would be:
>> -------------------------
>> tell application "System Events" to return ("ScreenSaverEngine" is  
>> in (name
>> of every process))
>> -------------------------
>> returns true or false
>>
>> regards
>> Bernd
>>
>>
>> BNig wrote:
>>>
>>> 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"
>>> -----------------
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/wake-from-sleep-tp24917002p24927194.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
> 

-- 
View this message in context: http://www.nabble.com/wake-from-sleep-tp24917002p24931893.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list