key4

key4Query Filter

#SingleInstance Force #IfWinActive, Project Structure moveCount := 0 active := true ; Initial...

#SingleInstance Force
#IfWinActive, Project Structure

moveCount := 0
active := true

; Initial tooltip
ToolTip, Move counter ACTIVE`nMoves: 0, 20, 20

Up::
    if (!active)
        return

    ; prevent key auto-repeat overcount
    if (A_PriorHotkey = "Up" && A_TimeSincePriorHotkey < 120)
        return

    moveCount++
    ToolTip, Move counter ACTIVE`nMoves: %moveCount%, 20, 20

    Send, {Up}
return

Down::
    if (!active)
        return

    if (A_PriorHotkey = "Down" && A_TimeSincePriorHotkey < 120)
        return

    moveCount--
    ToolTip, Move counter ACTIVE`nMoves: %moveCount%, 20, 20

    Send, {Down}
return

Esc::
    active := false
    ToolTip
return

#IfWinActive

Enter fullscreen mode Exit fullscreen mode