tthreeoh

monitor_off_block_input

Mar 5th, 2022
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if not A_IsAdmin {
  2.     run *RunAs "%A_ScriptFullPath%"
  3.     ExitApp
  4. }
  5. #SingleInstance, force
  6.     SendMessage, 0x112, 0xF170, 2,, Program Manager   ; 0x112 is WM_SYSCOMMAND, 0xF170 is SC_MONITORPOWER.
  7.     BlockInput, on
  8.     Input, doesntmatter,, {Escape}{Space}{Control}{Shift}{CapsLock}
  9.     BlockInput, off
  10.     exitapp
  11.     return
Advertisement
Add Comment
Please, Sign In to add comment