[办公]用快捷键锁屏+睡眠

使用快捷键Win+F12使电脑睡眠,类似于笔记本的Fn+F12

[办公]用快捷键锁屏+睡眠

使用方法:

  • win+F12睡眠
  • win+Shift+F12锁屏
; This is part of my AutoHotkey [1] script that puts my computer to sleep when I
; press Win+F12.

; I chose that keyboard shortcut because it's very similar to the Fn+F12
; keyboard shortcut on my laptop.

; I don't have my PC set to require a password to resume, so I also have a
; second version (Win+Shift+F12) in case I want to lock the PC first.

; [1]: http://www.autohotkey.com/


; Win+F12 - Sleep
#F12::
    ; Sleep/Suspend:
    DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
    ; Hibernate:
    ;DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
    Return

; Win+Shift+F12 - Lock and sleep
#+F12::
    ; Lock:
    Run rundll32.exe user32.dll`,LockWorkStation
    Sleep 1000
    ; Sleep/Suspend:
    DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
    ; Hibernate:
    ;DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
    Return

亲爱的朋友们,如果你认为本站不错请打赏,我们非常感谢你的支持!

[su_button url=”http://www.autoahk.com/buyamoney” style=”3d” color=”#ffe41c” size=”20″ radius=”round”]赏[/su_button]



给TA捐赠
共{{data.count}}人
人已捐赠
其他教程

[编程][GUI]华丽msgbox生成器

2016-12-1 14:39:08

其他应用

[游戏]剑灵剑士火系卡刀

2017-2-15 19:35:51

4 条回复 A文章作者 M管理员
  1. Learner

    赞一个 😀 我用上了 Thanks♪(・ω・)ノ

  2. Google

    Wonderful story, reckoned we could combine several unrelated information, nonetheless truly really worth taking a appear, whoa did 1 learn about Mid East has got a lot more problerms at the same time.

  3. matrixbug

    正在学习中。。。

个人中心
购物车
优惠劵
有新私信 私信列表
搜索