turn screensaver on

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
foguetes
Posts: 19
Joined: 19 Oct 2018, 04:58

turn screensaver on

08 Aug 2019, 04:27

I made a Autohotkey script to turn the screensaver on when I press Ctrl+Esc.
It suddenly stopped working.

Code: Select all

; turn off screen

#Persistent

^$Esc::
Run, %windir%\system32\scrnsave.scr /s
return
What's wrong with it?
Rohwedder
Posts: 7628
Joined: 04 Jun 2014, 08:33
Location: Germany

Re:

08 Aug 2019, 06:43

Hallo,
I assume you're suddenly using the recommended directive #NoEnv.
Try:

Code: Select all

^$Esc::
Run, %A_WinDir%\system32\scrnsave.scr /s
return
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: turn screensaver on

08 Aug 2019, 10:54

Code: Select all

SendMessage, 0x112, 0xF140, 0,, Program Manager

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Rohwedder and 372 guests