FEATURE REQUEST: An enhancement to get Hardware and Software based Information without coding

Hello Peter (@peternlewis)

Here is another Feature Request that I have for you - maybe there was someone else in the past - maybe not … so here it is.

Based on the fact that there are already some useful information related Tokens and Functions built into Keyboard Maestro, we still have to script a lot of stuff together using various languages like AppleScript - with or without Objective-C API‘s or Bash or any other preferred ones, where this specific thing we want to handle on as a base with our Macros or just for grabbing the information we want to share with others.

A new Token like the currently missing %FrontApplicationNameAndVersion% token that we could put into a Variable - something we could use to get Keyboard Maestro 10.2 from without any code in any language.

Or a combination of a new Function and some other new Tokens like MACINFORMATION(%MacType%,%MacModelIdentifyer%,%BuildYear%,%ProcessorType%,%ProcessorCoreCount%,%ProcessorSpeed%,%SystemNameAndVersion%) could be used in a Variable to get an output like this:

MacBook Pro, A1278, mid 2010, Intel Core2Duo, 2 Cores, 2.3GHz, macOS High Sierra 10.13.6

Which is the possible Value of this Function and Tokens - based on one of my Macs I currently have in use. And again - all without any scripting involved.

Also something like a SCREENTYPE() Function could be quite useful as of this example: SCREENTYPE(SCREENINDEX(Main)) - which would give me Retina 5K as an output on my 2020 iMac.

This are only a few ideas from me … maybe others will have good ideas as well

Hope you think it is worth it for non scripting people as well for the scripting folks.

Greetings from Germany


In the interim, if you needed it, maybe you could use something like this and split the results into variables:

Hello @cfriend

Thanks for pointing to Tom‘s Macro for System Information… even though the fact that I didn’t provide a link to it in this Topic‘s OP above it‘s a way that I was speaking about using these words

And by the way - I have this Macro already in my toolbox for a very long time … maybe 2 or more years …

My feature request is based on a Macro like this - to get such information in the future without any coding by just using Variables with a combination of Functions and Tokens and maybe do the formatting of the result using scripting if not already feasible using only KM‘s native actions.

Greetings from Germany


1 Like

What specifically are you after, and what specifically are you trying to do that requires that information?

Because obviously there is an endless amount of information that could be returned in tokens that likely also have other simple ways to retrieve it. So without a good reason for any specific ones, its hard to know what I should spend the time adding.

1 Like

Hello Peter

First of all, thank you for responding on this Feature Request.

Well, getting back to the first part of your question, my intentions are that - even though you’re right and the most scripting for gathering this type of information is easy - all KM users, especially new users won’t have to dig into scripting for that. Yes it is a good way to start learning scripting, but maybe not in all languages.
And if someone has to write a macro that contains a complex script which will act differently based on such information it will be even better because this person will only have to parse the Variables that are using these Functions and Tokens into their code and let the magic happen by writing less code using still the same amount of information.

While I am interested in learning scripting in various languages and maybe many others not I think this would be a huge benefit from every aspect. An example with a little story form perspective:

[Story on:] You’d probably already know that I am tinkering a lot with AppleScript and Apple‘s Objective-C API’s these days. And in the past there was a big issue gathering hardware based information using ASObjC - it was the release of Big Sur 11.3?! - where the AppleScript code had to be recompiled using Big Sur as OS to detect the right version. Remembering it ? A long time I hand a solution using a Submacro to write the code out to a compiled file - because every script in any language I have is a compiled script - getting the correct Information I wanted.

A friend of mine - the one who recently died (mentioned that elsewhere in this forum) helped me to rewrite the code completely so that I can use this script whenever I need it and always get the right info because the essential code is nested in that script and gets written to a compiled file when needed and afterwards deleted when the infos are offered to the workflow. [:End of Story]

Why I am telling you this? Because this is one example of how such an easy task learning to script for this type of information can be a hassle. especially when you have to get it working for more then one OS Version in a preferred language.

And even all this is working now from with KM 9 and 10 and from Yosemite up to Monterey I wish that such a thing would be possible without the have to in the future of KM and a little bit of a wish that it were integrated earlier because even the fact that I love what I do to learn programming I also sometimes really hate it …

Maybe Apple breaks something again in the near future - we all have to live with it as their customers using their hardware and software products.

But everything that is happening on our side, automated by your fabulous product KM with less more effort brought into custom code we have to write and maintain, is something what I am thinking about is absolutely worth it to put time into integrating as much as possible in form of Functions and Tokens into KM.

As I was mentioning to answer the first part of your question following the other parts as well - maybe I found a way to answer everything and I gave you a little insight what I have done to solve this kind of thing for the usage of KM talking to my hardware.

Now that my fingers hurt my message to you is finished. Thanks putting so much effort and time into Keyboard Maestro‘s Development. I appreciate that.

Greetings from Germany


Hey Tobias,

Peter asked for specifically what features you want.

There are hundreds of available attributes – exactly which ones do you want? He can't ready your mind...

Once he knows he can decide what's worth his development time.

I think the following are very reasonable asks:

  • Keyboard Maestro Version.
  • System Version.
  • Basic Hardware Information.

Peter is not going to throw in the kitchen sink, so think carefully about what you really want and what will be useful to many other people (not just you).

As for the frontmost application's name and version – this will work with most apps:

set AppleScript's text item delimiters to space
tell application (path to frontmost application as text) to ¬
   return ((get its {name, version}) as text)


1 Like

As @ccstone notes, what I want to hear is not something like "you should add a bunch of theses" what I want to hear is "I need to get the Keyboard Maestro version so I can write a macro that will work with version 9 or 10 of Keyboard Maestro". For feature requests, I want to hear about specific things you are going to do that you can't easily do now without an addition to Keyboard Maestro. Real things that you really want to do, rather that things that someone might do.

I trust that makes sense?


I've added some for the next version.