Trying to open screen saver with Applescript and FileMaker

I am writing an article on launching screen savers from FileMakler Pro. Here is the script that I have.


do shell script
“/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
&”
activate


Yet I cannot seem to get it to work from FileMaker. Could someone please take a look and help me with this script.

In Kindness
Stephen

Model: eMac
Browser: Internet Explorer 6.0
Operating System: Mac OS X (10.3.1)

I use this line in an applescript:

activate application "ScreenSaverEngine"

OK :slight_smile: That was 100 times simpler thank you :slight_smile:

In Kindness
Stephen

You’re welcome. I assume you know that to wake the screen from a script it is easiest to do this:

tell application "System Events" to keystroke space

This is the equivalent of hitting the spacebar, and if the screensaverengine is running, System Events gets the “space” character so it doesn’t get entered on whatever is on the desktop. There’s no need to quit the engine from a shell script.

Adam

Thank you very much! Along this same line, is there any way to have applescript lock down the computer and ask for a password?

With windows, I can simply call up a screen saver that requires a password to log back in, or I can use the following code: rundll32.exe user32.dll, LockWorkStation and it will bring-up the password protected screen to log-in.

So I guess I’m asking is there any way to call applescript that will bring up the Mac password prompt that will lock users out of the mac until they enter their password.

I hope that I explained that ok!

In Kindness
Stephen