Last active
December 29, 2015 02:29
-
-
Save nnnik/7600443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1::gg("1") | |
2::gg("2") | |
F3::gg("") | |
3::gg("3") | |
gg(button) | |
{ | |
static LastKey,running,LastTick=A_TickCount | |
If running | |
return | |
running:=1 | |
If (A_TickCount-LastTick>500) | |
LastKey:="" | |
LastTick:=A_TickCount | |
If !button | |
LastKey:="" | |
LastKey.=Button | |
If IsLabel("Label" LastKey) | |
{ | |
gosub, Label%LastKey% | |
LastKey:="" | |
timecalled:=0 | |
} | |
running:=0 | |
} | |
Label11: | |
Label12: | |
Msgbox You pressed 1 as the first nr. ;put shared Code here | |
If (A_ThisLabel="Label11") | |
{ | |
Msgbox Label11 ;put code specific for 11 here | |
} | |
else | |
{ | |
Msgbox The other Label ;put code specific for 12 here | |
} | |
return | |
Label21: | |
Label22: | |
Label13: | |
Label23: | |
Label33: | |
Label31: | |
Label321: | |
Msgbox % A_ThisLabel | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment