I have several macros that work properly. I duplicated one and pasted it into a new group, but it's not working. I finally discovered that the ones that do work contain the phrase "When [application] is at front":
The one that doesn't work lacks that language:
How does that phrase get attached to a macro? I cannot figure out how to duplicate a macro and then attach it to another application, for use when that application "is at front."