key5

key5Query Filter

#SingleInstance Force #IfWinActive, Project Structure moveCount := 0 active := true ToolTip, Move...

#SingleInstance Force
#IfWinActive, Project Structure

moveCount := 0
active := true

ToolTip, Move counter ACTIVE`nMoves: 0, 20, 20

$Up::   ; <<< IMPORTANT: $
    if (!active)
        return

    ; prevent 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