Re: Script length limitations
Re: Script length limitations
- Subject: Re: Script length limitations
- From: Zack Jarrett <email@hidden>
- Date: Fri, 24 Sep 2010 21:29:36 -0700
Thanks Nathan. I use "load script" extensively in my code already and it does work well for certain tasks (loading libraries and the like). I can't use it at the moment though because my AppleScript script is just saved as text and I cannot compile it. load script takes a compiled script object and my code won't compile. ScriptEditor, Script Debugger, and osacompile all fail when I try to compile these monsters.
Zack On Sep 24, 2010, at 7:33 PM, Nathan Greenstein wrote: You may wish to make wish of the load script command. I imagine this will solve your problem.
AppleScript Language Guide, Page 135.
On Fri, Sep 24, 2010 at 16:03, Zack Jarrett <email@hidden> wrote:
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
|
_______________________________________________
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