Activate Clipboard History Switcher with Bring to Front not working

Hello everyone,

I've got a macro that I really love to use, it's a slightly modified version of the "Activate Clipboard History Switcher" macro, that has the twist that when I keep holding the ⇧ button it clicks the search field so that I can start typing. It used to work really well with Keyboard Maestro 6, but it's not working anymore with KM7. I found the issue seems to be that something has changed with the Clipboard History Switcher window. I presume it's some sort of implementation issue, maybe an oversight on Peter's end.

The question remains, is this a bug in Keyboard Maestro or can I adjust the macro to make it work again. I've tried various things, including an AppleScript to activate the window.

Here's the macro:

Activate Clipboard History Switcher
Comment ‘The Clipboard Switcher needs some time to fade in.’
Pause for 1 Seconds
If All Conditions Met Execute Actions
Click at (-50,40) from the Top Right Corner of the Front Window

The conditions are:
The front window of "front application" title is "Clipboard History Switcher"
AND
These modifiers are pressed ⇧

Thanks!

Not sure about the bug issue, but instead of clicking with the mouse, why don’t you script command-F, which is the keystroke combination to put the cursor in the search field?

Hey Zettt,

There’s no fade-in for me, but I have animation turned off.

Not sure about the change in KM; Peter will have to comment on that.

I don’t really understand the attraction of your macro though. I just bring up the CHS and type Cmd-F if I want to search, but of course it’s easy to automate:

Activate Clipboard History Switcher
Type the ⌘F Keystroke

Tab back out if you want to return to the list.

I usually want to search for something, so I think I’ll incorporate this into my own CHS macro.

<shrug>

-Chris

The change that is affecting this is that the front application is now pretty much always the application with the menu bar as opposed to a background application that owns the front window.

This is probably not a good thing per se, it comes as part of the whole change to the “modern” running application API. I will be looking at this to see whether I can restore the old behaviour, but its non trivial.

Because of this change, the “front window” condition will not see the Clipboard History Switcher window.

Thank you, Peter, for the technical explanation of this problem. I tried @ccstone’s and @rolian’s suggestion and it is working.

That is the most important thing for this. :smiley_cat: