I don't think "spell checked" is a global variable, is it? It's just a variable I was setting in a script based on the external value that should have already existed in a KM variable.
Any variable that does not have “local” or “instance” at the start of its name is a global variable and is written to disk.
Local and Instance variables are not written to disk and are just stored in RAM.
The AppleScript to read and write Global variables differs from the AppleScript used for Local and Instance Variables.
I am sure @Nige_S can explain it better than me, but that is the gist of it ![]()
Or were they fine because they weren't preceded by a call to Standard Additions (say, in @ppayne's example)?
This seems to be a general problem for macOS 27 Golden Gate, whatever version, but only for some people. Like @Zabobon, I've upgraded my test machine from macOS 26 to 27, and this morning to 27.0.1, and everything's working fine wrt KM and AppleScript.
In short -- you'll only find out if you have an issue by upgrading. If you do and it's a show-stopper you'll need to downgrade to macOS 26 -- you'll need to wipe the machine, reinstall Tahoe (see here for making a bootable installer), then migrate the correct timepoint from Time Machine.
Edit to add:
It looks like a wipe and re-install of 27 cured this for you, pointing more and more towards a duff installation/upgrade on problem machines.
I've also upgraded this morning to 27.0.1 and everything continues to work fine.
Really? That should throw an error -- spellCheckedValue is undefined at the point you try to get its value. As opposed to either:
say "about to set variable"
set spellCheckedValue to "foobar"
tell application "Keyboard Maestro Engine"
setvariable "spellChecked" to spellCheckedValue
end tell
...or:
say "about to set variable"
tell application "Keyboard Maestro Engine"
setvariable "spellChecked" to getvariable "spellCheckedValue"
end tell
...which will work fine, the results of the second depending whether the KM Global variable spellCheckedValue exists (the KM Global spellChecked is set to the value of spellCheckedValue) or not (getvariable returns an empty string and then the KM Global spellChecked is set to that empty string, which deletes it).
As @Nige_S has pointed out, that script has intrinsic errors—if you fix it to match what he shows in his reply, it should run fine. It does here on my Mac, which has the stated issue only for local or instance variables.
Were you trying to set the variable based on a Keyboard Maestro variable (in which case you need the getvariable construct) or to an existing AppleScript variable (in which case you need to set it first)?
-rob.
Sorry for not being clear, it wasn't an entire script but just a snippet.
I just upgraded my "regular" laptop (not the test machine) to macOS 27.0.1 from Tahoe, and it's working fine.
Sigh.
-rob.
A friend with a MacStudio (same as mine) just upgraded to Golden Gate; his Keyboard Maestro is also fine.
So whatever happened to my laptop seems to be a one-off, though I'd love to know what the issue is. Once 27.2 official is out, I'll just do a restore to that and hope it fixes it. In the interim, it seems like it'll be safe to update my main Mac.
-rob.
My issues are also fixed, using MacOS 27.2 Beta (26B5101f) and KM 10.2.