• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: maximun allowed text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: RE: Two line Do Shell Script
  • Next by Date: Re: Get mail in Mail.app
  • Previous by thread: Re: maximun allowed text
  • Next by thread: OS 9.2.2 with AS 1.8.3 question
  • Index(es):
    • Date
    • Thread