Skip to content

Commit

Permalink
fix: 锁屏息屏优化
Browse files Browse the repository at this point in the history
  • Loading branch information
snomiao committed Apr 9, 2021
1 parent 99badff commit 5fc30d9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Modules/功能-锁屏时自动息屏.ahk
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Return

#l::
~#l::
; Run rundll32.exe user32.dll LockWorkStation,, Hide
cmdScreenOff := "cmd /c start """" powershell (Add-Type '[DllImport(\""user32.dll\"")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)"
Run %cmdScreenOff%,, Hide
; cmdScreenOff := "cmd /c start """" powershell (Add-Type '[DllImport(\""user32.dll\"")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)"
; SendMessage, 0x112, 0xF170, 2, , Program Manager
SendMessage, 0x112, 0xF170, 2, , Program Manager
Sleep 1000
SendMessage, 0x112, 0xF170, 2, , Program Manager
; Run %cmdScreenOff%,, Hide
Return

; 创意参考: [按下Win+L键,玄机来了]( http://m.cfan.com.cn/article/105095 )
; 创意参考: [按下Win+L键,玄机来了]( http://m.cfan.com.cn/article/105095 )

0 comments on commit 5fc30d9

Please sign in to comment.