I am suspecting a bug with Monterey but has anyone got a suggestion to get around the “Internal table overflow” issue when adding a Save command to a Contacts Applescript?
Previous similar issues seem to refer to the Applescript being too long but I can get the issue with the following script.
tell application "Contacts"
set thePerson to make new person with properties {first name:"Test", last name:"User"}
make new email at end of emails of thePerson with properties {label:"Work", value:"test" & "@example.com"}
make new address at end of addresses of thePerson with properties {label:"Home", city:"Fakeville", street:"1234 Some St."}
save
end tell
Hi,
Can’t help with solution but I have the same issue. The problem item in the script is the save command.
Even something as simple as
tell application “Contacts”
save
end tell
will not compile - gives syntax error. I had though that maybe there was a problem with my Monterey installation but went to the Apple shop this afternoon clicked into Script Editor on one of their machines and typed in the script as above. Same problem. Notice that no issue with retrieving data from Contacts problem is when you write information and then save. Hope at least this helps a little and I am looking forward to a solution. All the scripts I have still work with Big Sur. Also writing into Calendar works with Monterey. Looks like a Monterey issue with Contacts.
Cheers,
John H
wrote script named saveContacts.scpt with one line:
Tell application “Contacts” to save
Boot from current HD 12.1 version
replaced
save
to: #save
set thescript to alias “MacintoshHD:Users:Library:Scripts:SaveContacts.scpt”
run script thescript
et voila, no script editor compiler errors and it works…
Not much use but I can also confirm this Monterey AppleScript Contacts bug.
Very frustrating as a I had a nice Keyboard Maestro Macro that used AppleScript to make new Contacts and now it’s broken. Hope Apple fixes this and I will submit Feedback too. I suspect it’s not high on their list.
I am having the same issue, running the script from osascript.
This was failing in OSX 12.1 on an iMac but was OK on 12.1 on a MacMini (I have no idea why). But after updating to 12.2 the MacMini was failing too.
Now I have to run the script on a very old MacMini OSX 10.15.7 and it runs OK.
On a MacBook Air on OSX 12.0.1 with the M1 processor, the scripts run OK. That appears to be the latest available for the M1 chip.