Title: Re: Text Limit
I think Paul is answering the wrong problem. It isn't script size > 32K, it is text variable > 32K. In my experience there <are> certain things you cannot do to text chunks over 32K, even though AppleScript will store them. I'm not sure what they are in detail.

Can you give us the exact code that is failing? You say you are trying to "add" 64K of text to the body of a message. I don't have any problem with the script "Insert Text File" which reads a text file and then uses
"set selection to theText" to insert it, even when the file is >32K. Perhaps you can write the data to a temp file? But all that does is read the file into a variable, so reading from the database record should work as well. That code looks like this:

(*
    Insert Text File...
    
    © 2000 Microsoft Corporation
    
    Inserts a text file into the current message
    
    If this script is saved as an applet, you can drop files on the applet to have
    them inserted

*)

on run {}
    set theFile to choose file with prompt ¬
        "Select the file to insert" of type {"TEXT", "ttro"}
    insertFile(theFile)
end run

on open (fileList)
    repeat with theFile in fileList
        insertFile(theFile)
    end repeat
end open

on insertFile(theFile)
    try
        set fileRef to open for access theFile
        set textToInsert to read fileRef
    on error errString
        display dialog "There was an error reading the file because:" & errString ¬
            buttons {"OK"}
        return
    end try
    
    try
        tell application "Microsoft Entourage"
            activate
            set selection to textToInsert
        end tell
    on error errString
        display dialog "This script can only insert into the body of a message" buttons {"OK"}
        return
    end try
end insertFile

On or near 5/9/01 10:08 AM, Jed Verity at [EMAIL PROTECTED] observed:

> Interesting. Just for the record, the script itself is 129K and it attempts
> to access 64K of text from FileMaker. The 64K should be stored in a variable
> and then passed to an outgoing message in Entourage. By all accounts, it
> appears that the error pops up when attempting to set the body of the new
> messsage. The text is stored in the script with no problem...
>
> Thanks for your continued help...
> Jed
>
> On 5/9/01 9:59 AM, you wanted me to know this:
>
>> On 5/9/01 9:48 AM, "WilliamLH" <[EMAIL PROTECTED]> wrote:
>>
>>> Sounds like AppleScript, there is an event handler in AppleScript that can
>>> not perform tasks with over 32K of text, I get it all the time with
>>> Retrospect's AppleScript Event Handler.
>>> Just my $0.02
>>
>> It's NOT AppleScript. It's Script Editor. Use Smile, and evidently
>> Retrospect too.
>>
>> I have Smile scripts that total contain 560 K of text.
>
>
> ~)~)~)~)~)~)~)~)~)~)~)~)~)
> Jed Verity
>

--
Add me to Palm/Visor: http://signature.coola.com/?[EMAIL PROTECTED]
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
A Mac family since 1984 <http://home.earthlink.net/~allenwatson/>
Applescripts for Outlook Express and Entourage: <http://homepage.mac.com/allenwatson/>

Reply via email to