This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Hide All Porn On Resume

By: a guest on Oct 29th, 2013  |  syntax: Autohotkey  |  size: 0.47 KB  |  views: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2. This script detects a power change when resuming from Sleep mode.
  3. It then mutes the sound and minimizes all windows using WindowsKey and M.
  4. I haven't tested it fully, but in theory it should work.
  5. Coded by errorseven
  6. */
  7. #SingleInstance, force
  8. #Persistent
  9.  
  10. OnMessage(0x218, "WM_POWERBROADCAST")
  11.  
  12. WM_POWERBROADCAST(wParm)
  13. {
  14. If wParm = 0x12
  15.         {
  16.         SoundSet, +1, , mute
  17.         sleep 500
  18.         SendEvent, {LWin Down}{M Down}
  19.         sleep 500
  20.         SendEvent, {LWin UP}{M Up}
  21.         }
  22. }
  23. Return
clone this paste RAW Paste Data