Unfortunately not all apps expose their AX tree - in a way that can be traversed from top 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!
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?
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
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 ;-(
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.
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:
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?
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 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.
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 , 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.
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...