"Out of memory" error
"Out of memory" error
- Subject: "Out of memory" error
- From: martin schiller <email@hidden>
- Date: Wed, 22 Nov 2000 09:32:05 -0800
I probably didn't provide enough info to expect an answer. The "out of
memory" error only occured with the one message and my script has been
working satisfactorily on subsequent messages. The script is pasted below.
--earlier msg------
I found that I got this error this morning when running a script that has
worked well for me so I suspect that I'm seeing indications of some other
problem.
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.
-----end prev msg, start script-------
tell application "Claris Emailer"
set theprops to {}
set theMessage to the filtered message
--set theMessage to the displayed message of the front window
set theprops to the properties of theMessage
set theorigsubj to the subject of theprops
try
set thefirstoffset to offset of "]" in theorigsubj
set thenewsubj to items (thefirstoffset + 1) thru -1 of theorigsubj as
string
on error
set thenewsubj to theorigsubj as string
end try
if thenewsubj contains "RE:" then
repeat while (offset of "RE:" in thenewsubj) > 0
set foundoffset to offset of "RE:" in thenewsubj
set thenewsubj to "Re: " & items (foundoffset + 3) thru -1 of
thenewsubj
end repeat
end if
if thenewsubj contains "Re: Re:" then
repeat while (offset of "Re: Re:" in thenewsubj) > 0
set foundoffset to offset of "Re: Re:" in thenewsubj
set thenewsubj to "Re: " & items (foundoffset + 8) thru -1 of
thenewsubj
end repeat
end if
if thenewsubj contains "Re:Re:" then
repeat while (offset of "Re:Re:" in thenewsubj) > 0
set foundoffset to offset of "Re:Re:" in thenewsubj
set thenewsubj to "Re: " & items (foundoffset + 7) thru -1 of
thenewsubj
end repeat
end if
if the first character of thenewsubj is space then
set thenewsubj to characters 2 thru -1 of thenewsubj
end if
set the subject of theMessage to thenewsubj as string
move theMessage to folder "pen-l" of folder "discussions"
end tell