• 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: "Out of memory" error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Out of memory" error


  • Subject: Re: "Out of memory" error
  • From: Nigel Garvey <email@hidden>
  • Date: Thu, 23 Nov 2000 02:55:01 +0000

martin schiller wrote on Wed, 22 Nov 2000 09:32:05 -0800:

>I'm running Claris Emailer 2.0v3 and mail actions run a script to strip
>out subject prefix and superfluous Re:. When I found one of the email
>that were supposed to be stripped in the inbox this morning I tried
>running mail actions on it again and repeatedly got a small dialog window
>that warned "Out of Memory".
>
>If anyone could help point me to where I should be looking to find the
>cause of this problem I'd be grateful.

[Script snipped]

I think Michelle's answered your query. I don't know if it'll help, but
this version of your script uses slightly less memory by dispensing with
unnecessary lists, coercions, and string duplications and does less work
in the process:

tell application "Claris Emailer"
set theMessage to the filtered message
set theorigsubj to the subject of theMessage
try
set thefirstoffset to offset of "]" in theorigsubj
set thenewsubj to text (thefirstoffset + 1) thru -1 of theorigsubj
on error
set thenewsubj to theorigsubj
end try

if thenewsubj contains "RE:" then -- not case sensitive
set i to 1
repeat while word i of thenewsubj is "Re" -- ditto
set i to i + 1
end repeat
set thenewsubj to "Re: " & text from word i to -1 of thenewsub
end if

if the first character of thenewsubj is space then
set thenewsubj to text from word 1 to -1 of thenewsubj
end if

set the subject of theMessage to thenewsubj
move theMessage to folder "pen-l" of folder "discussions"

end tell

NG


  • Prev by Date: RE: limiting decimal places...
  • Next by Date: Re: Most Scriptable Apps (was: Re: Can a script receive
  • Previous by thread: Re: "Out of memory" error
  • Next by thread: Word file to Quark file
  • Index(es):
    • Date
    • Thread