Re: maximun allowed text
Re: maximun allowed text
- Subject: Re: maximun allowed text
- From: "Arthur J. Knapp" <email@hidden>
- Date: Mon, 29 Jul 2002 13:59:15 -0400
>
Date: Fri, 26 Jul 2002 14:40:21 -0400
>
From: Fausto Blasco <email@hidden>
>
Subject: maximun allowed text
>
... I just found out that Script editor won't let me paste
>
together several code modules into my final script. I get an error
>
stating that the text exceeds the maximun allowed. What is the script
>
size limit for Script editor?.
Approximately 32,000 characters.
>
... Do I have to buy a more powerful code
>
editor?
This subject comes up on the mailing list every once in a while.
Script Debugger and Smile both allow unlimited text, however, there
are usually ways to get by just with Apple's script editor.
First is the possiblity that your code can be condenced and made
more effiecent, by the use of handlers, etc.
Secondly, a script can load other scripts into itself, (which does
not increase the character limit for the editor):
-- script file "Main Script"
--
set MathLib to load script alias "path:to:math_lib.scpt"
GetSquare( 25 ) of MathLib
-- script file "math_lib.scpt"
--
on GetSquare( x )
return ( x ^ 0.5 ) div 1
end GetSquare
The above requires the script file "math_lib.scpt" to "travel around"
with the main script. An alternative is to load the script at "compile-
time".
-- script file "Main Script"
--
property MathLib : load script alias "path:to:math_lib.scpt"
GetSquare( 25 ) of MathLib
The property MathLib is now a part of the script. So long as you do not
recompile the main script, math_lib.scpt is now longer needed for the
script to run.
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.