G'day
I'm looking to add macros to press buttons inside FileMaker design windows.
How would you constrain macros to a partially named window within an application?
G'day
I'm looking to add macros to press buttons inside FileMaker design windows.
How would you constrain macros to a partially named window within an application?
There's more than one way. The best way is to use the following simple action:
You should carefully read the wiki page for that action and follow its instructions.
https://wiki.keyboardmaestro.com/action/Press_a_Button
If that doesn't work, we can find other ways. Some apps and/or their windows don't work with this action. I don't have FileMaker so I can't determine for you if that app will work. But I suspect it will work for you.
Have you got an example? Do you mean buttons within a FileMaker app (database) or are you talking about FileMaker UI buttons when in "Layout" mode?
Constrain how? Only run when that window is frontmost? Only recognise a button within a particular window, even when there's another window with the same "view" and a similar name? For the first you can put the macro in a Group that is only available in certain apps and certain focused windows:
...which will makes its macros available when Safari is frontmost and the active window's title starts with "Start of Window Name" (but can have any text after that).
Image detection (for "click on a button") can be constrained to the frontmost window. @Airy's "Press Button" only targets active interface elements, so is generally restricted to the active window -- just make sure the window containing the button you want to press is frontmost.
Plenty of other methods, depending on what you actually want to achieve.