I'm am trying to create a macro that will press a button in the Fantastical 2 preference pane to hide/show the Fantastical 2 icon in the dock. The "press button" action works when Fantastical has a dock icon, but it does not work when Fantastical does not have a Dock icon.
I'm guessing that KM isn't finding the button, because Fantastical doesn't have a dock icon.
- Is this the case?
- If so, is there a way to use the "press button" action for a window without a dock icon?
- If this isn't the case, any idea why this isn't working?
Here's what this macro looks like:
Thanks for the help!
Press Button only works in the front window of the front application, where Keyboard Maestro generally only considers the front application to be foreground applications.
Probably the only possibility is to use click at found image to click the button.
To click relative to an image, you use the Mouse Click action, configure it to be relative to a found image, and take a screenshot of the desired area of the screen using Command-Control-Shift-4, and paste it into the image well on the action. The image has to be unique (which includes not being visible in the action if the image is small enough not to be shrunk in the image well) otherwise Keyboard Maestro will not know where to click. The Display option in the action will allow you to see where Keyboard Maestro is matching.
Worked like a charm. I didn’t even know that KM offered a click relative to image option. Thanks!