User Tools

Site Tools


action:Start_Screen_Saver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
action:Start_Screen_Saver [2015/07/02 15:35]
mirazjordan created
action:Start_Screen_Saver [2023/10/26 10:14] (current)
peternlewis
Line 1: Line 1:
-The Start and Stop Screensaver ​actions immediately start or stop the screensaver selected in System Preferences. ​+ 
 +====== Start and Stop Screen Saver ====== 
 + 
 +The //Start and Stop Screen Saver// ​actions immediately start or stop the screensaver selected in System Preferences. 
 + 
 +Note that there is a bug in macOS such that, depending on your system preferences,​ Keyboard Maestro may not be able to determine the currently selected screen saver. The action is in fact a simple AppleScript:​ 
 + 
 +``` 
 +delay 1 
 +tell application "​System Events"​ to start current screen saver 
 +``` 
 + 
 +You can display what the system thinks the current screen server is with the AppleScript:​ 
 + 
 +``` 
 +tell application "​System Events"​ to current screen saver 
 +``` 
 + 
 +To resolve this issue, you can change your screen server settings until the system figures it out and the above command returns something valid, or you can use the AppleScript and select a screen saver explicitly like this: 
 + 
 +``` 
 +delay 1 
 +tell application "​System Events"​ to start screen saver "​Flurry"​ 
 +``` 
 + 
 +You can get a list of the options with: 
 + 
 +``` 
 +tell application "​System Events"​ to name of screen savers 
 +``` 
 + 
 +===== See Also ===== 
 + 
 +==== Actions ==== 
 + 
 +* [[Execute an AppleScript]] 
 +* [[:​Actions|See all Actions]] 
 + 
 +===== See Also ===== 
 + 
 +=== Actions === 
 + 
 +* [[:​Actions|All Actions]]
action/Start_Screen_Saver.txt · Last modified: 2023/10/26 10:14 by peternlewis