Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #SingleInstance
- SetKeyDelay 0, 0
- A_HotkeyInterval := 0
- SendMode "input"
- CoordMode "tooltip", "screen"
- #R::reload
- #UseHook 1
- keys := ["Numpad0", "2", "3", "4", "5"]
- ak := [0,0,0,0,0]
- lastAk := 0
- *Numpad0:: {
- global
- thisKey := 1
- akCount := 0
- loop ak.length
- akCount += ak[A_Index]
- if (akCount >= 2)
- return
- Send "{" keys[thisKey] "}"
- ak[thisKey] := 1
- lastAk := thisKey
- KeyWait keys[thisKey]
- ak[thisKey] := 0
- Send keys[5]
- lastAk := 0
- }
- *2:: {
- global
- thisKey := 2
- akCount := 0
- loop ak.length
- akCount += ak[A_Index]
- if (akCount >= 2)
- return
- Send "{" keys[thisKey] "}"
- tooltip "ak2 down", 10, 10, 1
- ak[thisKey] := 1
- lastAk := thisKey
- KeyWait keys[thisKey]
- tooltip "ak2 up", 10, 10, 1
- ak[thisKey] := 0
- Send keys[5]
- lastAk := 0
- }
- *3:: {
- global
- thisKey := 3
- akCount := 0
- loop ak.length
- akCount += ak[A_Index]
- if (akCount >= 2)
- return
- Send "{" keys[thisKey] "}"
- tooltip "ak3 down", 10, 30, 2
- ak[thisKey] := 1
- lastAk := thisKey
- KeyWait keys[thisKey]
- tooltip "ak3 up", 10, 30, 2
- ak[thisKey] := 0
- Send keys[5]
- lastAk := 0
- }
- *4:: {
- global
- thisKey := 4
- akCount := 0
- loop ak.length
- akCount += ak[A_Index]
- if (akCount >= 2)
- return
- Send "{" keys[thisKey] "}"
- ak[thisKey] := 1
- lastAk := thisKey
- KeyWait keys[thisKey]
- ak[thisKey] := 0
- Send keys[5]
- lastAk := 0
- }
- *5:: {
- global
- thisKey := 5
- akCount := 0
- loop ak.length
- akCount += ak[A_Index]
- if (akCount >= 2)
- return
- Send "{" keys[thisKey] "}"
- ak[thisKey] := 1
- lastAk := thisKey
- KeyWait keys[thisKey]
- ak[thisKey] := 0
- Send keys[5]
- lastAk := 0
- }
- *Left:: {
- global
- akCount := 0
- loop ak.length
- akCount += ak[A_Index]
- if (akCount == 2) {
- }
- }
- *Right:: {
- }
- ;setTimer(info, 50)
- info() {
- global
- tooltip ak[1] "`n" ak[2] "`n" ak[3] "`n" ak[4] "`n" ak[5], 10, 10
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement