AutoHotkey Cookbook

From: https://gist.github.com/davejamesmiller/1965854

screensaver(){
    SendMessage 0x112, 0xF140, 0, , Program Manager  ; activate screensaver
return
}
        
Also see: blank_screen() (Which is what you want, unless you still have a CRT; possily LockWorkStation/)