Hi @peternlewis - I can't get the new Keyboard Maestro token %SystemLongVersion% to produce any result. It just returns itself. %SystemVersion% works but not %SystemLongVersion%.
I am on macOS 14.1.1 Sonoma and Keyboard Maestro 11.02
Hi @peternlewis - I can't get the new Keyboard Maestro token %SystemLongVersion% to produce any result. It just returns itself. %SystemVersion% works but not %SystemLongVersion%.
I am on macOS 14.1.1 Sonoma and Keyboard Maestro 11.02
I notice that while the wiki refers to "%SystemLongVersion%
"
the GUI's Insert Token menu offers %LongSystemVersion%
( which is returning Version 14.2.1 (Build 23C71)
here )
Yes, great. That is it. It is a mistake in the documentation. The List of Tokens in the Wiki and the actual page for %SystemVersion% have the token as %SystemLongVersion% but it is actually %LongSystemVersion%. I suppose someone with editing rights can correct these two pages?
( I can understand, I think, why there might have been some hesitation or a change of mind there - pushing “System” to the start of the name does ease discovery in alphabetically sorted menus … )
Also, just to add that I had hoped it would return something like "Sonoma 14.2.1" but I suppose that would be asking for yet another Token... such as %SystemName% or %NameSystem%
I was thinking the OS name might be retrievable via one of the Terminal methods of getting macOS info, but that doesn't seem to be the case—uname
and system_profiler SPSoftwareDataType
and sw_vers
don't return Sonoma, etc., just numerical info.
As far as I can tell, the code name isn't findable anywhere—not even in the full output of system_profiler
.
If you really need it, you'd have to create your own little macro (probably a series of conditions in a Case action) to insert the known code names based one finding "12." or "13." or "14." in the token.
-rob.
There is a way to get the Mac OS name such as "Sonoma" etc, that @Martin came up with here.
It's the way I've been doing it, but a KM Token would be great.
Wow, that's some nice digging!
-rob.
I've seen that too, but the last time I checked, that technique did not work for beta versions of macOS.
That's the technique I've used. I've taken that logic and just shared a subroutine: 𝗌.𝘂⇾PlatformVersions, v1.0
Sounds about right, especially when I added all the other *Version, *LongVersion tokens.
I'll look at correcting the wiki and/or supporting both.
Following on from what @ComplexPoint said, it's always quite interesting for me as I finish up a major version and start doing the documentation overhaul, as I document features such inconsistencies and missing or confusing features often become clear, requiring a rethink in the details of new features.
So you are 10% human. Good to know.
The next version of Keyboard Maestro will support both %LongSystemVersion%
and %SystemLongVersion%
, however the correct one will be %SystemLongVersion%
from the next version onwards.