Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;0xB0BAFE77 v1 AHK
- settitlematchmode, 2
- #IfWinActive Chrome
- *~Tab::double_tap_tab() ; Hotkey that fires and runs a function
- double_tap_tab() {
- Static last := 0 ; Permanent variable to track last press
- If (A_TickCount - last < 500) ; Diff current tick from last tick. Has it been 500ms?
- {
- MsgBox working! ; If yes, run stuff
- last := 0 ; Then set last to 0. This prevents a triple tap from firing
- }
- Else
- {
- last := A_TickCount ; If it hasn't been 500ms, set last press to current tick
- }
- return
- }
- #IfWinActive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement