does BTT have the equivalent of the very useful Keyboard Maestro "Press Button" actions ?

Unfortunately not all apps expose their AX tree - in a way that can be traversed from top :cry: especially cross platform or electron based things like Teams won't work with this. I will add a check when configuring the item, and add a warning / error in this case.

For edge I may be able to add a workaround that I have used for window snapping in the past, I'll try that!

1 Like

Thanks!

I've just tried it with BTT's CM, but it seems it is missing some values? I've tried to select the "Favorites" element and the result was:

Application{"BetterTouchTool"} -> AXWindows[1]Window{""} -> AXChildren[0]SplitGroup{""} -> AXChildren[0]Group{""} -> AXChildren[0]ScrollArea{""} -> AXChildren[0]Outline{"Sidebar"} -> AXChildren[2]Row{""} -> AXChildren[0]Cell{""} -> AXChildren[0]StaticText{""}

Which was not working, however after I've added manually "Favorites" to "AXChildren[0]StaticText" I was able to to execute the only action "AXMoveMouseToCenter". BTW is it expected to have only 1 possible action?

1 Like

It currently only records roles, not the actual content of elements (that would sometimes lead to a large path). I'll check why it's not working with the favorites item, maybe it stops traversing for some reason. The recorded path looks good.

The side bar buttons don't offer any actions, so BTT just defaults to AXMoveMouseToCenter which works for all elements

1 Like

I have no idea how all of this is working, but I'll ask anyway - why in the example above, for MS Edge, each element have some value and in the case for BTT's CM they do not have?

Edge and the like are quite optimized to be very accessible by screen readers etc.
While I would like the same to be true for BTT, this is a lot of work and I don't really have the resources to optimize BTT in that way ;-(

2 Likes

Andreas, can I use the "Interact With / Click Specific Ul Element" action to focus the Search text field in the BTT's CM? The UI element path is:

Application{"BetterTouchTool"} -> AXWindows[1]Window{""} -> AXChildren[0]SplitGroup{""} -> AXChildren[2]TextField{""}

Is this related to your last comment?

1 Like

You can also use CMD+F to focus the search field in the clipboard manager.

The problem with automating BTT itself is that it currently records the windows for itself incorrectly. You can try this path instead:

Application{"BetterTouchTool"} -> AXWindows[0]Window{""} -> AXChildren[0]SplitGroup{""} -> AXChildren[1]TextField{""}

1 Like

Thanks for this. It doesn't work, it is moving the mouse to on the line between the left and middle panels.:

But CMD + F is good enough. Thanks.

1 Like

In 5.406 (uploading) I improved the path recording & element finding logic. It should now work much better hopefully the path now contains more things it can fall back to.

1 Like

Yep, now it is working better for this use-case. Thank you!

1 Like

Hey Andreas,

If I use "Click Button With Name In Active Window/Dialog", which is configured in another trigger, invoked from my original trigger next actions in my initial trigger are not executed. I've tested with a simple "Show HUD overlay" action which is not executed.

It is a bit confusing therefor adding some screenshots:

ps: if I use it like this it is working (all marked in red rectangle will be enabled):

Apologizes to jump in between (I can open another post, yet, LogicPro deeply relates to Keyboard Maestro).
I'd like to automate the blue bypass button on the top left corner. If pressed, it changes to grey. I am using this hundreds of times a day.
I uploaded the same screenshot and akes ChatGPT for an AppleScript to do that from BTT. Then I saw this post and tried it. Both are not working.
What do I have to know? Should I ask AI again?

what "path" did BTT record for these?

However that button also should be easily recognizable via the "Find Image On Screen And Move Mouse" action or maybe even with the standard "Move Mouse To Position" action - relative to the focused window

There was an error on my first try. Now it works almost 80%. See the video for the glitch, please. Sometimes although the front window is selected, it jumps to the window behind. After it works as expected.

Here is the path:
Application{"Logic Pro"} -> AXWindows[0]Window{"User Patch Inst"} -> AXChildren[7]Button{"Bypass"}

ah that's unfortunate, both of these windows seem to have the same title with the same button :cry: Which of them will be chosen is kind of random.
I think I could add an option to use the focused window for such cases.

1 Like

Huge thanks for the awesome feature. Can you give a little bit more info about AX Path? Is it support only indexes and label-based full matches, or maybe something else too? It will be useful to have "*" or ranges for cases when index isn’t stable and regexp or at least "contains" function for labels. For example, I want to target field "To" in Mimestream(the email client) to get into its ability to search similar mail, that hides in the context menu of that field, and regex/contains will be very useful for that.

Also, I tested iPhone Mirror app with Xcode’s Accessibility Inspector and saw that app exposes the device's AX tree properly. It was :exploding_head:, but I couldn’t access it from BTT - neither through the browser nor by hand-written AXPath. It would be extremely useful if we could interact with iOS mirror app.

1 Like

that would be awesome. Just to clearify: another trigger isn't working here? I thought, I saw something in your huge list saying "focused window"?

I have added a "focused window only" checkbox to the action in 5.445, maybe it helps in your situation

@Aleksei_Zakharchenko regex should now also be possible, however only if the path actually records any labels. The mimestream "to" field doesn't on my Mac

AFAIK the problem is, some apps tell you about an elements AX tree if you ask for it, but don't allow you to traverse the tree from the top. I'm currently looking into whether there are ways to get around that. Unfortunately Apple hasn't made the iOS mirror app available in the EU...

1 Like

5.445 will be released as alpha in the next days? Just that I make a note when it is time to return to try this feature :slight_smile:

ah sorry, the alpha upload apparently failed yesterday - will be online in a few minutes

1 Like