I am brand new to Keyboard Maestro, and am looking forward to learning.
The first thing I'd very much like to do is to create a macro to close a floating window. I've searched the forum but am not seeing anything where this is possible with KM alone.
Thanks in advance for any help you might be able to offer.
If you know how to close the window with your keyboard or mouse, then KM can do it for you by emulating the keyboard or mouse. What is your current method for closing the window? Do you use your mouse? Do you use the keyboard?
Some apps are well-behaved and grab the focus when they are visible. It's difficult to tell if this is your case since you haven't indicated which app it is.
I'm using Dorico Pro 5, which uses NotePerformer, Kontakt 7, and other plugin software instruments to play the music being notated. These plugins open from Dorico as floating windows. I haven't yet found any kind of keyboard shortcut to close them, so the only way I know how to close them is to use my trackpad.
I also haven't found a way to hide these windows. With Kontakt, the best I can do is to click on Dorico's main window and the Kontakt floating window will go to the background. NotePerformer won't do this: it stays in the foreground no matter how many other app windows I click on. The only way to get it out of the way is to manually close it or move it.
Would you be willing to walk me through the steps of how to direct KM to do this? Or point me in the direction where I can find out?
Since you are using your trackpad (which is the same thing as a mouse) what you are actually doing is using your eyes to spot the location of the window and then moving the pointer to that location and pressing some sort of "X" on the window to close it.
KM can do this also, using its Find Image action. However I can't see your window so I can't give very specific advice on how to do it. You can either read up on the Find Image action or perhaps you can post an image of the windows that you want to close so I can give you my advice on how to use the Find Image action to make this work.
Do you want to create a keyboard shortcut that will close one or all of them? That's what I would do. It might be as simple as a single action that would look something like this example: (the main difference would be the image that you copy into the image well. I can't see your window, so I can't place the correct image into the well.)
Does the process you're describing above depend on these windows being in the exact same position and looking exactly the same? On this screenshot for example, NotePerformer doesn't have any software instruments loaded. When it does, it looks like a mixing console. The content of what is in these windows changes from project to project, and often throughout the course of a single project.
To your question, I'd be very happy with a 'close all floating windows' option.
No, they don't have to be in the same position. But some part of the window has to have predictable content. I see under the three buttons there is a pair of buttons that is probably always the same. That's probably the best way forward. Create a macro like the one in my image above. In the Find Image action, you should place a screenshot of the two buttons directly below it. Do you know how to take screenshots using CMD-SHIFT-4? Grab those two buttons and then, assuming the image is placed into the clipboard, copy it into the image well of the Find Image action. Then you will need to use two offsets. My guess is that the offsets will be "4,-12" and "from the upper left corner of the image."
Try this and see if it works. I know my instructions are slightly vague, so I won't blame you if you don't know what I mean. But I have to leave for an hour or two.
It worked! Amazing. Thank you, @Airy. I just had to adjust the coordinates a bit (12, -12 - you were close!). Once I got that figured, it worked without a hitch.
The only thing that isn't working is closing multiple floating windows at once. It will close them one at a time as I keep clicking the hotkey. Any tips on that front?
I’m glad to hear it worked. Yes I was aware of the two windows at once issue but I decided to take only one problem at a time. When I get back home, I will try to answer your follow up question. It’s easy to fix.