Triggering KM macro from AppleScript with variable

To avoid this type of problem, I prefix all of my Global Variables with "DND_" that I want to keep and "Do Not Delete". I then periodically delete all KM Variables except those with the "DND" prefix.

See

Macro: Clean-up DELETE KM Variables @KM8

Better still is to always use Local or Instance Variables, which are auto-deleted when the Macro terminates, unless it is absolutely necessary to use a Global Variable.