J
Jammer Six
€ on AsText(str)
€ --coerce Unicode or other text to styled string to plain text
€ try
€ return (((str as string) as record)'s «class ktxt»)
€ end try
€ return str -- if plain text to begin with
€
€ end AsText
€
€
€
€ This will work around your problem. You still have to keep in the
€ substitution of "-" for ":" as well, of course.
This generated an error: "Can't continue 'As Text'".
The Script Editor stopped on the line "set theSubject to
AsText(theSubject) -- see below"
Here's the script. It doesn't work at all now.
************
--One address or the other must be commented out.
property spamAddr : "(e-mail address removed)"
--property spamAddr : "(e-mail address removed)"
tell application "Microsoft Entourage"
set tempFolderPath to (path to MUD as Unicode text) & "Entourage
Temp:"
set currentMessages to the current messages
set src to "I have some spam to report." & return & return & "Thank
you."
set theFiles to {}
repeat with i from 1 to (count currentMessages)
set theMessage to item i of currentMessages
set theSubject to subject of theMessage --as Unicode text
set theSubject to AsText(theSubject) -- see below
--if (count theSubject) > 29 then set theSubject to text 1 thru
28 of
theSubject & "Š"
set AppleScript's text item delimiters to {":"}
set wordList to text items of theSubject
set AppleScript's text item delimiters to {"-"}
set theSubject to wordList as Unicode text
save theMessage in (tempFolderPath & theSubject) -- just the path
--tell application "Finder" to update alias tempFolderPath
tell me to set theFile to alias (tempFolderPath & theSubject)
--actual file
set end of theFiles to theFile
delete theMessage
end repeat
set AppleScript's text item delimiters to {""}
make new outgoing message at out box folder with properties ¬
{content:src, subject:"Spam report", recipient:spamAddr,
attachment:theFiles}
end tell
on AsText(str)
--coerce Unicode or other text to styled string to plain text
try
return (((str as string) as record)'s «class ktxt»)
end try
return str -- if plain text to begin with
end AsText
*******
€ --coerce Unicode or other text to styled string to plain text
€ try
€ return (((str as string) as record)'s «class ktxt»)
€ end try
€ return str -- if plain text to begin with
€
€ end AsText
€
€
€
€ This will work around your problem. You still have to keep in the
€ substitution of "-" for ":" as well, of course.
This generated an error: "Can't continue 'As Text'".
The Script Editor stopped on the line "set theSubject to
AsText(theSubject) -- see below"
Here's the script. It doesn't work at all now.
************
--One address or the other must be commented out.
property spamAddr : "(e-mail address removed)"
--property spamAddr : "(e-mail address removed)"
tell application "Microsoft Entourage"
set tempFolderPath to (path to MUD as Unicode text) & "Entourage
Temp:"
set currentMessages to the current messages
set src to "I have some spam to report." & return & return & "Thank
you."
set theFiles to {}
repeat with i from 1 to (count currentMessages)
set theMessage to item i of currentMessages
set theSubject to subject of theMessage --as Unicode text
set theSubject to AsText(theSubject) -- see below
--if (count theSubject) > 29 then set theSubject to text 1 thru
28 of
theSubject & "Š"
set AppleScript's text item delimiters to {":"}
set wordList to text items of theSubject
set AppleScript's text item delimiters to {"-"}
set theSubject to wordList as Unicode text
save theMessage in (tempFolderPath & theSubject) -- just the path
--tell application "Finder" to update alias tempFolderPath
tell me to set theFile to alias (tempFolderPath & theSubject)
--actual file
set end of theFiles to theFile
delete theMessage
end repeat
set AppleScript's text item delimiters to {""}
make new outgoing message at out box folder with properties ¬
{content:src, subject:"Spam report", recipient:spamAddr,
attachment:theFiles}
end tell
on AsText(str)
--coerce Unicode or other text to styled string to plain text
try
return (((str as string) as record)'s «class ktxt»)
end try
return str -- if plain text to begin with
end AsText
*******