Simple Conditional on off (if then else)

Hi, @Angelo_Ramirez; welcome to the Keyboard Maestro forum.

Since you are a new forum user, I'm going to refer you to three references that will make your time here much more efficient:


With each execution of the macro, are you trying to toggle global variable Bart from 2 to 1 and vice versa? That is, undefined -> 2 -> 1 -> 2 -> 1...

If so, the actions you displayed seem to work. I reproduced and tested them:

Download: Bard Variable.kmmacros (5.6 KB)

Macro-Image


Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 13.5.1 (22G90)
  • Keyboard Maestro v10.2

1 Like