OS X screen saver - somewhat off topic

Sarah Reichelt sarahr at genesearch.com.au
Tue Apr 27 02:41:02 EDT 2004


>> I realize that I probably won't be able to wake the screen from 
>> sleep, but I am tantalizingly close to being able to turn off the 
>> screen saver. Has anyone else managed to do this? If it can't be 
>> done, I guess I can always write myself a fake screen saver in 
>> Revolution, but I would rather let the system do all the work :-)
>
> okay, I am being radical, but can't you kill the process using shell 
> function?
>
> you could fetch the process using:
>
> ps -aux | grep "ScreenSaverEngine"
>
> first word will be process ID (pid)
>
> then to a:
>
> kill --KILL <pid>
>
Like the AppleScript, it works fine so long as the screen saver time 
limit hasn't been reached, now to test if it has.

For anyone who is interested, the script is slightly different to the 
one Andre suggested:
   get shell("ps -auxc | grep " & quote & "ScreenSaverE" & quote)
   if it is empty then exit to top
   put word 2 of it into pID
   get shell ("kill " & pID)

Many thanks,
Sarah



More information about the use-livecode mailing list