Start Screen Saver not working in Mojave

Start Screen Saver is not working (reliably, for me) in Mojave. It does work occasionally, so maybe a Mojave bug?

Mine works. I did get a dialog to allow KM access though. Once I did that, the macro works every time. Good luck.

Thanks. For now, I'm using Execute Shell Script >> open -a

The action is basically just:

delay 1
tell application "System Events" to start current screen saver

So you can run that AppleScript and display the result in a window and see if you get any error messages.

I get a weird error about GetInputSourceEnablePref. It's possible it requires All Disk Access (maybe it is accessing some file or folder Apple thinks should be secured for some reason).

But that wouldn't explain why it works some times and not others. Well, maybe it would, who knows.

There have been a few reports about sporadic misbehaviour of the System Events application, so perhaps that could be the issue as well.

1 Like

Thanks for the explanation, Peter. I am having System Events problems in Mojave. For some reason, System Events never quits like it should, and eventually becomes quietly unresponsive. My workaround in AppleScript is to quit System Events at the start of any script that uses it. I'm assuming it's a Mojave bug for now.

Hello Peter, I also have the problem and have tried your suggested solution. Apart from nothing happening, I get no result. It's not so bad now, but it's annoying.

In Mojave, Apple broke (rdar://problem/46586145) the AppleScript current screen saver:

tell application "System Events" to current screen saver

It returns screen saver ""

So you can write your own AppleScript like this:

delay 1
tell application "System Events" to start screen saver 1

And that should work (adjust the 1 as desired (or use a name, which does not actually match the visible names)).

Thanks, Peter. That invokes a random screen saver. I've gone back to my previous solution of a KM macro to move the cursor to the top right corner of the screen to invoke my chosen screen saver. A bit lame, but it works.

You can specify the screen saver by name, you just have to find out what it is called.

AppleScript like tell app "SystemEvents" to name of screen savers should get you started I think.

Thanks. That gives 8 choices of screen saver (out of 18 available), none of which is my choice of "Classic". Interesting though.

Hey Bill,

This might be worth a look.


Thanks, Chris. I couldn't get it to work for Classic > Landscapes.