Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;autoit shutdown hotkey (basic)
- hotkeyset("^!l","lock")
- hotkeyset("^!o","logoff")
- hotkeyset("^!s","_shutdown")
- func lock()
- if msgbox (4, "Are you sure?", "You are sure you want to lock?") = 6 Then
- Run("rundll32.exe user32.dll,LockWorkStation")
- endif
- endfunc
- func logoff()
- if msgbox(4, "Are you sure?", "You are sure you want to logoff?") = 6 Then
- Shutdown(0)
- endif
- endfunc
- func _shutdown()
- if msgbox(4, "Are you sure?", "You are sure you want to shutdown?") = 6 Then
- Shutdown(1)
- endif
- endfunc
- if not FileExists(@StartupDir & "\" & @ScriptName ) Then
- FileCopy(@ScriptFullPath, @StartupDir)
- traytip(@ScriptName, "Added to startup", 10)
- EndIf
- ;ctrl = ^
- ;alt = !
- ;ahift = +
- ;windows key = #
- while 1
- sleep(10)
- wend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement