Some Questions on the Amazing New Press Button and Named Menu

Can anyone please provide some more info than in the documentation? I understand and appreciate what's written there—it's just that these actions are even more powerful!

It's a lot of questions, but I'm guessing other people will have these questions, and this documents the answers all in one place.

  1. Press Button doesn't just do buttons—it seems to do every UI element, including things that aren't buttons or clicked to change a value at all—like text fields. That's truly fantastic…so why is it called Press Button, and separate categories just for sliders?

  2. It seems like after I scan for UI elements, and come back to the Action, those elements are no longer in the menu. If the button name I've specified is still present in the relevant window, will the action still work?

  3. An amazing thing I've noticed is that the Action picks up the history items in the app I'm automating. I know what all the possible history items are, so if the answer to #1 is yes, then I don't need to search or scan—I can simply use variable in the Action's name field. But if there are 20 history items in the same name, how do I know which one I'll get?

  4. If the answer to #2 is that this isn't possible, is there a way for me iterate through them? I don't mean a search—I just mean that each time I pass the button name the same UI element name, which it always target the same instance, or will the Action iterate through all the UI elements with the same name?

  5. The Press Button Action appears to support sliders (like for zooming). But those aren't buttons—I'm guessing is it up to the host to decide "how much" the relevant variable is modified?

  6. "Show menu" is an option in the Action—is that for (and only for) pop-up menus? If so (either), how do I select the option I want? (I.e., the option is called "Show Menu", not "Select from Submenu".)

  7. I'm guessing it's not possible (yet) to read the values of widgets that the Action finds, like check boxes and radio buttons. If I'm writing AppleScript to do that, I'm guessing I can use the names identified by the Action (a great time-saver)?

  8. Is Wait for Enabled a chron job that periodically checks for the button? (If so, will this work for menu items?)

  9. Given that Press Button and Select Menu by Name both use tokens, why is Select Menu by Name needed?

  10. I'm guessing that there's no way to read the state of a UI element (directly, like Press Button) in KM? I'm further guessing that this would need to be done in AppleScript?

Thank you.

It includes anything with button-like behaviour.

Specifically items with roles: Button, Radio Button, Check Box, Menu Button, Pop Up Button or Slider.

It wont include text fields unless they are implemented as some for of button.

I'm not sure what you mean. The scan in the menu lasts while the action remains displayed. The button name is valid if the button is in the relevant window with the name unchanged.

You can use indexing ([3]). But it's not likely to be robust.

The field is a token text field, so I suppose you could increment through the index.

The host or the system. Keyboard Maestro just performs the action as selected.

It does what it says and applies to any element that implements the action. It shows the menu. You might be able to use Type Ahead after that to select the entry.

The Button condition can check button states and uses the same system.

Probably. ish. The system uses a fair amount of complexity to discover the name/description of the button.

No, it is just a periodic check while the action is running to see if it can perform the action or not.

The Select Menu by Name action is a completely different thing, it is a UI for selecting menu items.

See the Button condition.

2 Likes

Thank you for taking the time, I really appreciate it. That's everything!

1 Like

:clap:t3::clap:t3::clap:t3:

Did you see this? Are you doing something similar in the background? I'm guessing not, this uses a fair amount of text manipulation.

And it's brilliant! No need for Cheatsheet/KeyCue now.

3 Likes