thanks in advance for your time and help
what do they do?
Whenever a screen displays a button, for example, save or export. The examples are endless. Keyboard maestro offers a press button action which allows the user either to simply write the name of the button to press(save or export, etc.) or create a list of buttons for each front window of each app that the user can choose from
ah BTT uses actions for these things internally, but I haven’t exposed them yet. But probably makes sense to add these
good point. I thought that there was only find image. Find text is interesting. thank you
fantastic !! Thank you so much @Andreas_Hegenberg
This is really useful. Thanks Andreas! Quick question how does BTT knows which is button and which not? Based on AXRoleDescription, AXSubrole, AXRole etc. or something more complex?
I was just wondering if there's a way to click also other parts - like tabs in some windows e.g.:
<AXApplication: "Beyond Compare">
<AXWindow: "New Text Compare* - Text Compare">
<AXSheet: "Session Settings - Text Compare">
<AXTabGroup>
<AXRadioButton: "Alignment">
Attributes:
AXEnabled: "1"
AXParent: "<AXTabGroup>"
AXSize: "w=84 h=24"
AXFocused (W): "0"
AXRole: "AXRadioButton"
AXTopLevelUIElement: "<AXSheet: "Session Settings - Text Compare">"
AXHelp: ""
AXValue: "0"
AXTitle: "Alignment"
AXWindow: "<AXWindow: "New Text Compare* - Text Compare">"
AXRoleDescription: "tab"
AXSubrole: "AXTabButton"
AXPosition: "x=3085 y=353"
AXFrame: "x=3085 y=353 w=84 h=24"
Actions:
AXPress - press
It could, but targeting such items via Apple Script is much more performant
so for this example something like
tell application "Beyond Compare" to click radio button "Alignment" of tab group 1 of sheet 1 of window 1
or
tell application "Beyond Compare" to perform action "AXPress" of radio button "Alignment" of tab group 1 of sheet 1 of window 1
Of course I could add an action that takes a "AX Path" and then executes an action on the described element, but in the end that's just what Apple Script does
Could you argue that most of BTT's functionality falls in this category?
It would be really cool to automate and script the process of clicking on any element on macOS, copy its "AX Path", and then paste that into a BTT action.
Yes, maybe I'll just add a function to copy that path and the action from BTT's "hovered element viewer". Combining that with a "Execute AX Path" action or something like that would be pretty simple and maybe helpful
I would find it useful. Currently, I use UI Browser.
Coincidentally, I was chatting with a BTT user earlier this week to implement something similar.
Keynote_export.bttpreset (17.0 KB)
yup I also use UI Browser for these kinds of things (or Automator if I don't have UI Browser installed ;-))
I just tried this (I already have such functions internally) and it works well. Next version will allow you to copy a path like this and execute an action on the referenced element:
Application{"Finder"} -> AXWindows[0]Window{"Downloads"} -> AXChildren[2]Toolbar{""} -> AXChildren[0]Group{""} -> AXChildren[0]Group{"Back/Forward"} -> AXChildren[0]Button{"back"}