Is there a command that I can issue in applescript that will switch deactivate the screensaver? I don’t mean switch it off or anything, I mean just do the same as if you wiggled the mouse around a bit to bring the normal screen back?

I use an application (small and free) called Jiggler by Stick Software

I should add: activate application “Jiggler” will start it, and quit application “Jiggler” will stop it.

Hi, I’ll try that out, but this is something that I want to do right at the start of a script to ensure the script runs without the sceensaver “at the font” as it were. Anyone have anything easier than launching an application to do it? Is there just a single command that will do the trick?

The script opens illustrator files and converts them, but somehow does them without quitting the screensaver, which I don’t want.

I edited my reply just as you posted yours

Thanks Adam

I was expecting there was some “wake” command or something!

I’ll give jiggler a spin, if it works it works!

I think you’ll find it does. Jiggler is quite small (228K on disk) and starts very quickly so there’s no appreciable delay in getting it going. When it’s in action, it puts a large icon center screen which goes away immediately if you touch any key or the mouse.
Jiggler isn’t frigging with your energy saver settings; it’s just jiggling the mouse one pixel at the interval you set it for in its preferences (which has to be a bit shorter than you screensaver setting, obviously).

Brilliant, works like a dream - very fast to load and quit. Many thanks.

I discovered it a long time ago and love it. There are other ways to accomplish this in AppleScript of course, but for pure simplicity Jiggler beats them all. Short one-liners to start and stop, fairly brisk to do it, doesn’t require a shell script, just does it’s thing. Enjoy. If you do want the screensaver to start right after you quit Jiggler, use this line: activate application “ScreenSaverEngine” - and it happens immediately.


Actually there is a very similar and easy way to quit the regular screensaver also:

Start screen saver:
tell application “ScreenSaverEngine” to activate

Stop screensaver:
tell application “ScreenSaverEngine” tro quit


how about a script to just keeping it from starting up?

Adam, you mentioned that there were other ways of accomplishing this w.out Jiggler. Just wondering what those other ways were, as I’m unable to install applications on this machine.

One way, if the task running isn’t upset by a keystroke is to run an idle handler that periodically inputs a key - spacebar, control, whatever. The instruction is

tell application "System Events" to keystroke "" using {control down}
-- or
tell application "System Events" to keystroke space

If you want to reset the screensaver, then the best method is Kai’s (a frequent excellent resource on this forum):

--- Kai's ScreenSaver Script. Setting value to 0 is turning the screensaver off (never), setting 180 is setting it to 3 minutes. This script finds all occurences of screensaver settings and changes them all (because it is not at all certain which is in control).

set f to (path to preferences folder as Unicode text) & "ByHost"
tell application "Finder" to set l to (folder f's files whose name starts with "" and name does not contain "slideshow")
open item 1 of result
repeat with i in l
	set p to (i as Unicode text)'s POSIX path
	tell application "System Events" to tell property list item ¬
		"idleTime" of property list file p to if exists then
		if value is 0 then
			set value to 180
			set value to 0
		end if
	end if
end repeat
tell application "ScreenSaverEngine"
end tell

Unfortunately, it’s hard to find out what the screensaver setting is in general - I know what to look at on my machine, but it doesn’t work across all machines (hence Kai’s script).