Create a Status/Toggle Button for a Palette

Continuing my exploration of palettes, I have a macro that will automatically resize a front window of a certain app if it is wider than half of my screen. That macro is working great; however, sometimes I don't want to resize!

I wanted "a button" for my palette that will toggle that behavior while updating the button's appearance to let me know whether or not auto-resizing is currently enabled or not.

Here are the two macros I have come up with to achieve this effect (and for thoroughness, the companion macro that they are concerned with):

:white_check_mark: Auto Resize Window?.kmmacros (2.4 KB)

:x: Auto Resize Window?_2.kmmacros (2.4 KB)

GC12 Window Watcher.kmmacros (7.7 KB)

I considered some other ways to achieve this, such as a script or macro that would enable/disable actions within a macro, and/or renaming one macro with the emoji indicators as needed... but this seemed easier :slight_smile:

1 Like