I’m communicating between my app and Filemaker with AppleScript. A couple of users have reported the above error message in Filemaker.
My app does an AppleScript which tells Filemaker to execute a Filemaker script. Because this is done async the Filemaker script ends with sending an horribly simple AppleScript back to my app:
“tell application id "com.mothsoftware.mailarchiverx"¶
ignoring application responses¶
«event M” & Right (“0000000” & Mail::RecID; 7 ) & “»¶
end ignoring¶
end tell”
As result of the error the AppleEvent isn’t sent and my app goes into timeout. I had Goggled a bit the error message. But the only references I found were for huge scripts.
Does anyone have an idea how I can fix my AppleScript so that I don’t get the error message anymore.
The most likely reason for generating such an error is that the user has not installed some scripting addition necessary for the script to work correctly
Scratching head… Which scripting addition should be necessary for sending a raw AppleEvent? The error usually happens after having processed a couple of thousand emails and not at the beginning.
Internal table overflow generally means a script is too complex. It’s often caused by scripts that are too long, but it can also be caused by things like too much nesting or too much recursion.
I’m pretty sure FileMaker uses a single instance of AppleScript to run all scripts, so it’s possible your script is just tipping things over the edge. Probably the best suggestion is for users to quit and relaunch FileMaker, and see if it goes away.
Now I see, with scripting addition I was wrong. But…
Logically, if you send this event repeatedly, without waiting for a response from the Mail ArchiverX, and Mail ArchiverX does not have time to process them, then this events accumulate in the queue and overflows the memory. You can add the necessary delay immediate after the event sending to solve this problem
tell application id "com.mothsoftware.mailarchiverx"
ignoring application responses
«event M" & Right ("0000000" & Mail::RecID; 7 ) & "»
delay 0.5
end ignoring
end tell
Thanks, that makes sense. Doing the async processing is a bit annoying. When my app gets the AppleEvent the next email is processed. I don’t really like the idea of a delay because speed is important. But I’ll try a smaller delay.
Beatrix
I’d rather lose some time with a proper delay than attempting close Filemaker, restart the machine, perform a checkup with DiskUitility, rebuilt the directory with DiskWarrior and get the very same error at more or less 4000 mails.
In any case, when the mails to archive are several, nothing else can be done with the Mac. So minutes, or half hours, or even hour more will be welcome if the FMP database would collect whatever is needed soundly
Danwan
Model: MacBook PRO
Browser: Safari 537.36
Operating System: macOS 10.14
@kerflooey: plugins aren’t an option. My solution handles mailbox selection, LaunchAgents and much more which Filemaker can’t do or the interface would be very poor.