Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This script detects a power change when resuming from Sleep mode.
- It then mutes the sound and minimizes all windows using WindowsKey and M.
- I haven't tested it fully, but in theory it should work.
- Coded by errorseven
- */
- #SingleInstance, force
- #Persistent
- OnMessage(0x218, "WM_POWERBROADCAST")
- WM_POWERBROADCAST(wParm)
- {
- If wParm = 0x12
- {
- SoundSet, +1, , mute
- sleep 500
- SendEvent, {LWin Down}{M Down}
- sleep 500
- SendEvent, {LWin UP}{M Up}
- }
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement