Applescript: Howto check if Screensaver / loginscreen is active?

Hi all,

With Applescript I'd like to check whether screensaver or loginscreen is active.

Background: My EyeTV TV-Box wakes the Mac up to record something. Screensaver is locked with a password. After wakeup by EyeTV Applescript determines the screensaver not to be active.

Howto check if the loginscreen is active?

Thx in advance!
Marco

iMac 24" - iPhone 3GS - HP Laserjet M1120n MFP, Mac OS X (10.6.3), Airport Express 7.4.2

Posted on Jun 8, 2010 7:33 AM

Reply
1 reply

Jun 9, 2010 1:49 AM in response to Marco Ney

Here's my code:

tell application "System Events" to set the saveractivated to (exists process "ScreenSaverEngine")
if saveractivated then
-- nobody in front of the Mac
end if

1st scenario: I leave my (working) Mac. ScreenSaver activates. > saveractivated = true

2nd scenario: Sleeping Mac has been wokeup to record a movie. > saveractivated = false ?!

Howto check the second scenario?!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Applescript: Howto check if Screensaver / loginscreen is active?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.