Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #InputLevel 1
- #SingleInstance Force
- PID := DllCall("GetCurrentProcessId")
- ProcessSetPriority "High", PID
- Hotkey "^1", Exit
- global G_Key := "g"
- global LControl_Key := "LCtrl"
- g::PressKeyBindOneDown
- PressKeyBindOneDown(){
- DllCall("keybd_event", "UChar", GetKeyVK(LControl_Key), "UChar", GetKeySC(LControl_Key), "UInt", 0, "Ptr", 0)
- DllCall("keybd_event", "UChar", GetKeyVK(G_Key), "UChar", GetKeySC(G_Key), "UInt", 0, "Ptr", 0)
- }
- g up::PressKeyBindOneUp
- PressKeyBindOneUp(){
- DllCall("keybd_event", "UChar", GetKeyVK(LControl_Key), "UChar", GetKeySC(LControl_Key), "UInt", 2, "Ptr", 0)
- DllCall("keybd_event", "UChar", GetKeyVK(G_Key), "UChar", GetKeySC(G_Key), "UInt", 2, "Ptr", 0)
- }
- Exit(ThisHotkey){
- ExitApp
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement