Skip to content

Add ifAlreadyRunning/ifNotAlreadyRunning macro condition.#1550

Merged
kareltucek merged 3 commits into
UltimateHackingKeyboard:masterfrom
kareltucek:ifAlreadyRunning
May 9, 2026
Merged

Add ifAlreadyRunning/ifNotAlreadyRunning macro condition.#1550
kareltucek merged 3 commits into
UltimateHackingKeyboard:masterfrom
kareltucek:ifAlreadyRunning

Conversation

@kareltucek
Copy link
Copy Markdown
Collaborator

@kareltucek kareltucek commented May 9, 2026

Tests whether another macro slot is currently playing the same macro index as the current one. Useful to prevent re-entering a macro that is already in progress.

Changelog:

  • feature: add ifAlreadyRunning/ifNotAlreadyRunning conditions for simple re-entrancy guards inside macros

Test: tap twice this macro, expect only one output:

ifNotAlreadyRunning {
    write "Hello!"
    delayUntil 5000
    write "Good bye!"
}

Closes #1534

kareltucek added 2 commits May 9, 2026 13:55
Tests whether another macro slot is currently playing the same macro
index as the current one. Useful to prevent re-entering a macro that
is already in progress.
@kareltucek kareltucek marked this pull request as ready for review May 9, 2026 12:18
@kareltucek kareltucek merged commit abeb89b into UltimateHackingKeyboard:master May 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] reentrancy macro guard

1 participant