Doug4347

PC sleeps when ScrollLock is pressed 7 times

Dec 15th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ~ScrollLock::
  2. SplashImage,, h200 w400, started
  3. Loop, 6
  4. {
  5.     Now:=A_TickCount
  6.     KeyWait, ScrollLock
  7.     KeyWait, ScrollLock, D T11
  8.     Diff:=A_TickCount-Now
  9.     If DebugMode
  10.         SplashImage,, h200 w400, Looping`n%A_Index%`n`n%A_TickCount%`n%Now%`n%Diff%
  11.     If Diff > 400
  12.     {
  13.         SplashImage,, h200 w400, Ended
  14.         Return
  15.     }
  16. }
  17. DllCall("PowrProf\SetSuspendState", "int", 0, "int", 1, "int", 0)
Advertisement
Add Comment
Please, Sign In to add comment