How Do I Click Based on Name of Window, like in QuickKeys?

Hello! I just started the daunting task of converting all of my Quickeys macros to Keyboard Maestro. Exciting! Going ok so far, but there is one major difference in these programs that is tripping me up in all of my macros. The CLICK command in QK lets you be dependent on the name of the window. AFAICT, Keyboard Maestro only lets you choose which corner (or center) of the front window is relative to what gets clicked. Is there no way to tell KM that you want to choose XY position relative to "This Window" corner? I've tried inserting a "Bring Window Named XY To Front" command before it, but it doesn't seem affective in applications that have several windows open at once. I'm using Digital Performer in High Sierra, btw. It usually has 8 - 12 separate windows open at the same time.

Other than that... loving the KM experience so far.
Thanks for any suggestions!
Greg

I believe you are talking about applications that have multiple "data windows" open at once. I don't think I have any such applications. Most of my apps are from Apple and Apple avoids multi-window apps. So it's hard for me to test this to try to find a solution.

However I may have the answer for you. Have you tried this action:

Perhaps you need a Pause Until to ensure the correct window is frontmost.
This simple example macro works fine for me in BBEdit:

MACRO:   Click Location Relative to Specific Window [Example]

**Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/b/f/bfe091cc7bfa4b502d49e37f5d0b051f4391a3e1.kmmacros">Click Location Relative to Specific Window [Example].kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**


---


<img src="/uploads/default/original/3X/d/3/d357d84d370e3986ce4832b7388797da9e1f9ed3.png" width="458" height="686">


### Questions?

This is incorrect.

Here are at least two Apple apps that use multiple windows:

  • TextEdit
  • Pages

and probably:

  • Numbers

  • Keynote

  • Terminal

  • Mail

  • . . .

Correct. They are data windows, or palette windows, or info windows. Lots of different names. Music and graphic design programs use this layout frequently. In my specific case (Digital Performer), there are always small function windows popping up, requiring user decision and hitting ok. These pop up windows are the main problem in having with KM. Quickeys was very simple about choosing a window based on name, level, front most, or position. Still trying to find a good solution for co getting all these macros.

Greg

That's true. And I use multiple windows all the time. But we had a misunderstanding. I was referring to windows within a window. There was a time (which hasn't gone completely) when apps had multiple windows open inside their primary window. I don't recall a time when any Apple app did that. That's what I thought the poster was referring to when I said "I believe you are talking about applications that have multiple "data windows" open at once." That's what I meant by "data windows". These are sometimes called sub windows, child windows, or embedded windows. That used to be the only way Microsoft apps worked.

Thanks for feedback about this. I’m still a little confused why Keyboard Maestro needs to use so many steps just to identify a window to perform a function in. It definitely seems to me, that if KM can recognize a window in an application as the “Front Window”, then it should be able to recognize any window by level or name. Would be a nice addition.

Greg

It does support selecting windows by name. I inserted an image above of the action that lets you bring a named window to the front. Did you try it?

To be perfectly honest I didn't test that action, I just read about it in the documentation. So I could be wrong.

I did try it, and combining several different steps together work. I was just pointing out that it could all be combined into the Click function, if that function let you specify the window by name instead of by being “front”.

Btw - is there a way to pause until the save/open dialog box appears?

Greg

The design philosophy of KM is quite different from QuicKeys. KM may feel like more work initially to former QK users, but in the end KM provides much more flexibility and QK. I'm pretty sure anything you can do in QK can be done in KM.

Please read Transition From QuicKeys to KM.

If the dialog box contains a button called SAVE, you could perhaps try this KM action:

I use that action occasionally for situations like what you are describing. Give it a try,

Oh, ok. I was under the impression that you didn't know how to do it.