I have some macros that require alternate logic that depends on the version of Keyboard Maestro, others that depend on the version of macOS.
For macros that I never plan to share, it's convenient to use subroutine 𝗌.𝘂⇾PlatformVersions with parameter ReturnContects 2 and 64, respectively and compare it to a specified respective version.
When sharing macros, subroutine dependance adds some level of complication, thus I normally skip the subroutine and embed the actions.
For convenience, I've added two groups of such actions to my Favorite Actions (Actions > Add to Favorites). These groups include the framework to:
-
set the minimum version for the primary logic,
-
determine the active version, and
-
add the conditional logic.
Download: Keyboard Maestro Version Conditional Logic.kmactions (10 KB)
Macro Actions-Image
Download: macOS Version Conditional Logic.kmactions (10 KB)