Button names …

Dear KM specialists, :wink:

after more or less struggling with this issue over years now I searched the forums but didn't find something similar. So today is the day to ask…

I like to use "press a button" in different applications. My very first problem is mostly if an "obvious" button behaves as a button or is recognizeable by KM as a button. I don't know how developers program their apps but there must be obviously a hundred ways to provide something which looks like a "button" for the end user but is a link, … whatever they call the other 99 ways.

My workaround to first get the needed information is to create an "if/then…" routine and check with "a button with this name…" if KM says "currently true" when the app is active. This works often but needs quiet some time to switch between the apps and check different spellings, whatever.

In some cases I can work with "A button: with name containing" - but the command "press a button" only uses "button named" so it needs the exact name, correct?

I have a specific button in Apple Numbers which looks like this:

image

KM recognises (name containing):

• Bedingte
• Markierung
• Bedingte Markierung

but NOT

• Bedingte Markierung...
• Bedingte Markierung ...

Since I work on different Macs with also different language settings I like to use the synced macros on all macs using "if the button [GERMAN]" press it, else press the [ENGLISH] version. If I can get the exact buttons name this works pretty good.

Any help or hint is much appreciated. Thanks in advance.

EDIT: I found the following hints via the help routine:

"The action allows you to specify multiple options separated by a vertical bar (eg This|That) to allow for toggling or varying buttons. They will also ignore the difference between three dots (...) and an ellipsis (…) so you do not have to worry which one is used.

Alternatively, you can start the name with an ^ and use a regular expression to match the button name.

As of 7.1+, you can use Text Tokens in the field."

I found the solution using "^" before the buttons name. I tried to delete my question but wasn't allowed to.

Sorry and thanks so much.

Cheers,
HaPe

If……if app language is German then press the [GERMAN] button,if app language is English then press the [ENGLISH] button.

KM can't recognize what language you are using, so you need to tell KM what to do next exactly.

Oh, as mentioned, languages are not my problem. This works well with my "if/then/else" routine.

The only thing still unclear to me is IF something that looks like a button IS a button without the need to check as written. :wink:

How do you create a button in Numbers?

This is a regular button from Numbers, not self created.

image

And this is an example from another application where I don't know what it is even if it looks like a button.

image

When I start creating macros for a new application I always have to figure out if something that looks like a button behaves like one and is accessible from KM.

Hi @Hans-Peter_Henkel, in Deinen Makros setzen die Button Makros voraus, das diese enabled sind. Wäre das so, müssten diese Blau hinterlegt sein. Bitte wechsle hier auf "exists" und probiere es nochmal.

2019-05-01_13-29-23

Hallo @appleianer,

vielen Dank - sorry, das war ein Fehler beim Erzeugen des Screenshots. Ich habe normalerweise immer "exists" für meine Tests verwendet. In etlichen Apps funktioniert das aber eben nicht und ich kann dann nur mit Klicks auf (hoffentlich gefundene) Grafiken oder mit Bezügen zu Fensterpositionen arbeiten. In manchen Fällen funktioniert das aber eben auch nur bedingt, wenn der Fensterinhalt und eine Position dynamisch sind.
Aber dennoch habe ich dich und deine Videos gerade aktuell vor ein paar Tagen erst wahrgenommen - sehr hilfreich. Insbesondere deine Empfehlung mit der Kombi aus BetterTouch und den Paletten habe ich für einige meiner Apps jetzt auch mal testweise implementiert. Teilweise habe ich schon gute Resultate. Ich bin gerade zeitlich sehr eng, aber wenn es mal wieder etwas "luftiger" werden sollte: würdest du bei Bedarf gegen Bezahlung KM-Nachhilfe z.B. als One2One Webinar geben?
Nur einfach mal so frech gefragt, ich hoffe, das geht in Ordnung. :wink:
Mir fehlen einfach einige Skills, um KM noch effizienter nutzen zu können.

Cheers,
HaPe