OS 13.0.1 Ventura.
Macro does not start screen saver.
I slimmed it down to a single step macro, and still no workee....
Appreciate any feedback.
Troy
OS 13.0.1 Ventura.
Macro does not start screen saver.
I slimmed it down to a single step macro, and still no workee....
Appreciate any feedback.
Troy
Hey @troy,
You know for sure that the macro is running?
You've tried rebooting?
Try this from an AppleScript action:
--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2022/11/16 16:21
# dMod: 2022/11/16 16:21
# Appl: System Events & Screen Saver
# Task: Start the Current Screen Saver
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Start, @Current, @Screen, @Saver, @Screen_Saver
--------------------------------------------------------
try
tell application "System Events"
set ssRef to current screen saver
start ssRef
end tell
on error errMsg number errNum
set errMsg to errMsg & linefeed & linefeed & "Num: " & errNum
if errNum ≠ -128 then
try
tell application (path to frontmost application as text) ¬
to set ddButton to button returned of ¬
(display dialog errMsg with title ¬
"ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
default button "OK" giving up after 30)
if ddButton = "Copy Error Message" then set the clipboard to errMsg
end try
end if
end try
--------------------------------------------------------
This works on Mojave, but I can't test with later versions of macOS at this time – so no guarantees.
-Chris
Probably not what you want to hear, but:
...works fine here (macOS 13.0 -- I'll apply the update later and let you know if that breaks anything).
I'm assuming manually triggering the screensaver, e.g. with an Hot Corner, works and so you haven't got anything forcing "wakefulness"?
Thanx Chris,
System Events got an error: Can’t get screen saver "".
Num: -1728
Hi Nige, thanx...
Hot Corner works,
I made a 1 step macro as you showed above, before posting, and it does not work.
Have you tried changing the screen saver to something else?
Have you got the "Ventura" screen saver selected in System Settings->Screen Saver? Try setting it "Monterey" or "hello" instead. Be warned -- it took quite a while for System Events to notice the change on my machine, a logout/in would probably speed that up.
Erg, the first sign would be that I can't 'preview' any of the screensavers...
Yet, I can change the screensaver and trigger it from a 'hot corner'.
I was trying to emulate a mouse 'swipe' into the corner to trigger the screensaver, with no luck... although it's not the final 'fix' I'd like, it would work in the meantime...
Any thoughts about the 'swipe'??
-thanx
Another iMac, recently repaired by Apple (new fans), formatted, Ventura, KM does not start the screensaver.
The Screen Saver Hot corner does start it...
'''System Events got an error: Can’t get screen saver.
Num: -1728
'''
As above -- which screensaver is it set to use?
On my test machine, the "Ventura" screensaver appears to have no "name" -- I also get Can't get screensaver ""
. But when I set it to the "Monterey" or "hello" screensavers it works fine.
It does appear to take a while for the change to propagate to the scripting side of macOS, so it give a few minutes before trying the macro again.
Thank you Nige as always...
It works for any screen saver now.
It MAY have been that I assigned full disk permissions to the KM Engine as well?
EDIT: ok, insane, it did work..... I changed nothing, 3 minutes later and it does not work.... I'm going home for dinner and not going to worry about the screensaver right now... =)
Blessings man...
For me it reproducibly fails when switching back to the "Ventura" screensaver. But remember, it takes while for the change to register and switching from "Monterey" to Ventura" will let KM continue to trigger the "Monterey" saver until it does.
This works for me in Sonoma beta 1:
activate application "ScreenSaverEngine"
I was having the same problem on MacOS v14.0 (23A344) Sonoma when using the Sonoma screen saver set to Shuffle All.
Thanks @billearl – your suggestion is a great work-around.
/// AppleScript
activate application "ScreenSaverEngine"
Good. It's still the best solution here, after looking for an alternative a few days ago.