As the title says. On my PC I am used to being able to just push a button and the screen goes off but nothing else. How do I do this in a simple way on my new iMac?
tell application "System Events"
tell application "System Preferences" to reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
tell process "System Preferences"
set value of slider 1 of group 2 of tab group 1 of window 1 to 0
I also needed to do this when loading B&W film while listening to music. Turning the brightness down is not enough.
Just go system preferences > screen saver and hit the "hot corners" button on the bottom left.
Select "put display to sleep" for one of the corners, and when you want to switch it off, drag the mouse down to that corner.
Push the mouse or hit any key to turn the screen back on.