Pages, Numbers and Keynote Macro Breaking Changes

Just a note to warn people if they have macros relating to the now Apple Creative Studio absorbed apps like Pages, Numbers and Keynote, these are essentially new apps.

The “old versions” (14.5) and the new versions (15.x onwards) are actually completely different apps. They look the same, the name appears as “Keynote” in the Applications folder, but they have different files names ("Keynote Creator Suite.app") and different Bundle IDs, so they are entirely different apps (with the same displayed name, sigh) as far as Keyboard Maestro is concerned. So macros or macro groups that refer to them will not refer automatically to the new version (since the file name and bundle ID are different, no setting in the application popup menu will allow it to refer to both.

You will also see this in things like the Dock where the icon may break for example.

10 Likes

Yes, I was confused at first. I had to go through all my applicable macros and add the new apps. It is especially confusing when there are places within the macro (such as choosing menu items or controlling apps) where you have to change each action. At least the icons are different so it’s easier to see which one you are choosing. The biggest problem, though, is in using AppleScripts. I had to delete my old Numbers app because all the scripts would try to act on the old app rather than the new one. Does anyone know how to fix scripts in this instance? How would you script “tell application “Numbers”” to use the correct app?

Try tell application id "com.apple.Keynote" instead of just tell application "Keynote". You can target the old Keynote with tell application id "com.apple.iWork.Keynote".

If you ever want to find an app's bundle identifier, you need to open Terminal, then do this:

$ cd /Applications
$ mdls -name kMDItemCFBundleIdentifier -r  "NameOfAppAsDisplayed.app"

That should return a form of com.whatever.whatever, and that's the bundle identifier. I wrote a simple macro that returns the bundle ID for whatever app I have selected in Finder, as I do this a lot :).

-rob.

4 Likes

Or as an AppleScript (run from Script Editor, a KM AS Action, whatever) that will set the System Clipboard ready for you to paste:

set the clipboard to (get id of (choose application with prompt "Select an app to get the Bundle ID of:"))
6 Likes

Tried this to open the app from the Dock, but

tell application "System Events"
	tell application process "Dock"
		tell list 1
			-- tell (first UI element whose name is "Numbers")
     tell application id "com.apple.Numbers"
				perform action "AXPress"
			end tell
		end tell
	end tell
end tell

because it is a UI element, how to write this?


This didn't work either

tell application "System Events"
	tell application process "Dock"
		tell list 1
			tell (first UI element whose name is "com.apple.Numbers")
				
				perform action "AXPress"
			end tell
		end tell
	end tell
end tell

System Events got an error: Can't get Ul element 1 of list 1 of application process "Dock" whose name = "com.apple.Numbers".

Invalid index.

/okn

Is there a particular reason you need to open the app from the Dock? That seems like a very complicated way to do it.

If you do, I honestly had no idea how to reference a UI element for a Dock item by bundle ID, so I asked an AI. It said this would work:

tell application "System Events"
    tell application process "Dock"
        tell list 1
            tell (first UI element whose value of attribute "AXURL" contains "com.apple.Numbers")
                perform action "AXPress"
            end tell
        end tell
    end tell
end tell

I haven't tested it myself, as I'm more interested in why the Dock is involved at all? Are you just trying to launch the app, or is there more to it than that?

-rob.

The UI elements of the Dock don't have bundle IDs as either properties or attribute values, so you can't target them in this way.

You can do

tell application "System Events"
	tell process "Dock"
		tell item 1 of (every UI element of list 1 whose name is "Finder") to click
	end tell
end tell

...although that will require unique element names.

Using AXURL as @griffman's AI buddy suggests might work -- except the value is a file path and not a bundle ID.

And I have to echo @griffman -- why do this in such a complicated way? What do you need to do that's only available via the Dock UI and no other way?

This didn't work anyway

error "System Events got an error: Can’t get UI element 1 of list 1 of application process \"Dock\" whose name = \"com.apple.Numbers\". Invalid index." number -1719

Yes, it is much easier to launch an app directly from Applications, and with Numbers:
/Applications/Numbers Creator Studio.app
+
with
Type the ⌘N Keystroke

because of the new UI, an extra step to avoid.

/okn

Argh… Before manually changing hundreds of references to “Numbers” I was wondering if there is any workaround to effect a “Find/Replace” type function in KeyMaestro?

In Script Editor 2.11 (233) for Apple Script 2.8 (which comes with macOS 26.3), entering

tell application “Numbers”
	activate
end tell

automatically substitutes “Numbers Creator Studio” on compilation, thus

tell application "Numbers Creator Studio"
	activate
end tell

This “substitution” simplifies updating Execute Applescript {as Text Script} steps which refer to “Numbers” multiple times: copy the script to the editor, recompile it, copy it back. (For shorter scripts simply replacing “Numbers” by “Numbers Creator Studio” works as well.)

Update:

[1] Having deleted the Numbers 14.5 & cycled the Mac, clicking on “Execute text script” in Keyboard Maestro Execute AppleScript step {to force the compile} ALSO substitutes “Numbers Creator Studio” for “Numbers”;

[2] in a script to count the number of open window in Numbers [Version 15.1 (7044.0.271)], the following script fails:

tell application "System Events"

**set** windowCount **to** **count** **of** *windows* **of** *process* "Numbers Creator Studio"

end tell

but this works fine:

tell application "System Events"

**set** windowCount **to** **count** **of** *windows* **of** *process* "Numbers"

end tell

Not really, no.

If you are very brave, you can quit Keyboard Maestro and Keyboard Maestro Engine, and you use BBEdit to search and replace in the Keyboard Maestro Macros.plist XML file.

Thank you for the suggestion, but I fear that’s “beyond my pay grade” (i.e. competence)!

Then maybe export some of the macros that reference Numbers, search and replace in the export file(s), re-import. Repeat until done.

Start with a test macro that has one Action referencing "old" Numbers and the same Action but referencing "new". Export that, open in the text editor of your choice, and you should be able to spot what needs changing.

Thank you Nige_S for this further suggestion.

I have taken a careful look at this approach. Even a simple test macro (involving only the "Activate Numbers” action) generates quite an extensive file (as I am certain you know), and generates 4 “hits” on searching for “Numbers”, 3 excluding the macro name.

Disambiguation by adding more search detail (such as “/Applications/Numbers”) would be possible of course. However, the list of disambiguating strings with “Numbers” in it grows quite quickly when other actions requiring application specification —such as “Open”, “Bring window Named…”— are considered.

It would of course be possible to use Keyboard Maestro to automate some of the Find & Replace steps process, however —considering that any error in these cascading substitutions would either make the reimported macro fail or worse— I decided to stick with making the edits in situ, which at least has the merit of keeping the context of any edit very clear*.*

That process is about complete now, and —rather like letting users run pre-release versions of software and flag bugs to the developers— I investigate any macros which still fail and amend as required, both in that macros and others with the same action(s).

By the way, possibly because I have several bootable drives complete with the Applications folders –which include inter alia the Numbers app– the xml code for a given macro in some instances included references to that volume as well.

Thank you again for taking the time to address my issue.

No, you have to use the structure of the plist in your search. You don't search for "Numbers", you look for a block:

		<dict>
			<key>BundleIdentifier</key>
			<string>com.apple.iWork.Numbers</string>
			<key>Name</key>
			<string>Numbers</string>
			<key>NewFile</key>
			<string>/Applications/Numbers.app</string>
		</dict>

...and replace that with the equivalent block you found for "new" Numbers.

It's certainly doable but you should definitely have a fresh backup of your plist file to hand, just in case...

I'd have probably done it manually too -- that may be time consuming, but it's a lot less stressful!

Using the id string can avoid that complexity.

tell application id "com.apple.Numbers"
    {name, id, version}
end tell


--> {"Numbers Creator Studio", "com.apple.Numbers", "15.1"} 

The problem doesn't arise, FWIW, in Script Editor (or VSC) handling of JavaScript for Automation.

(() => {

    const numbers = Application("Numbers");
    
    return ["name", "id", "version"].map(
        k => numbers[k]()
    );

    // → ["Numbers", "com.apple.Numbers", "15.1"]
})()

Wed 25Feb2026 19:12 I have just hit this problem having just upgraded.

It is bouncing all over the place.

Request to Peter: Would it be possible to be able to toggle display of all the Apps icons, and then it would be obvious which version the macro was accessing. "Orange Page = OLD" and "Crimson Page = NEW". Just a thought. (It already happens in some places, but not ALL.)

The system has a mapping for bundle IDs/applications and their icons, and Keyboard Maestro uses that.

I expect the system is about as confused as everyone else is by the change.

2 Likes

Change request submitted here..