Skip to content

Instantly share code, notes, and snippets.

@nnnik
Last active December 29, 2015 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nnnik/7600443 to your computer and use it in GitHub Desktop.
Save nnnik/7600443 to your computer and use it in GitHub Desktop.
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