Script length limitations
Script length limitations
- Subject: Script length limitations
- From: Zack Jarrett <email@hidden>
- Date: Fri, 24 Sep 2010 16:03:45 -0700
Hey fellow AppleScripters,
I've got a program that generates AppleScript code from a proprietary language. Depending on the length of the input the output can be quite lengthy and I'm running into trouble with scripts that have too many operations occurring in a try/except block. It's not uncommon for my program to output an AppleScript script with 4000+ operations occurring inside of one try block. These operations include calls to applescript functions, System Events functions, various applications, and lots of custom handlers that I've defined.
The problem I'm running into is that the code in the except block isn't running when there's an exception in the try block. Exceptions in the Try block code are simply not handled; it's like the AppleScript run time dies. If I cut the code in the Try block down to 3000 or so operations then the code runs just fine and exceptions are handled by the Except block as expected.
As a side note, when I attempt to compile or save these scripts using Script Debugger I get an error: "Cannot Write document. Signaled when a runtime internal data structure overflows (errOSAInternalTableOverflow:-2707)." I suspect that the Script Debugger behavior is related to the problem I'm seeing when running the scripts.
Is there some limitation to the amount of code that can exist inside of one try block? Is there a workaround for this?
This is all occurring on OS 10.6, by the way. I have no idea whether it's occurring on other versions of the OS.
Thank you for your help,
Zack _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden