Well, at least I got you on the right track!

I agree, offset is wonky; I was just being quick and dirty. Your version,
with a few tweaks to generalize it, could make a nice "between" handler.

On or near 6/11/01 9:13 PM, Paul Berkowitz at [EMAIL PROTECTED] observed:

> Yes, but i hate 'offset' with a vengeance and never use it myself. Too many
> possibilities of mistakes (another instance of a ">" sign would muck this up.)
> Also, someone could be sending an email without using a display name. Then you
> don't usually get the "< >" sign at all. Although, sometimes you do, but there
> would be no spaces left, because I'd removed them. Also, TIDs are a lot faster
> (not that it matters here).
> 
> I would do (after all the other text parsing);
> 
>   set AppleScript's text item delimiters to {"<"}
>   try
>       set dName to text item 1 of nameLine
>       try
>           set dName to text 1 thru �2 of dName
>       on error � no name, but < > around email addrtess
>           set dName to ""
>       end try
>       set eAddress to text item 2 of nameLine  -- may error if no email
> address
>       set AppleScript's text item delimiters to {">"}
>       set eAddress to text item 1 of eAddress
>   on error
>       if nameLine contains "@" and nameLine does not contain " "
>           set dName to ""
>           set eAddress to nameLine
>       else
>           set dName to nameLine
>           set eAddress to address of sender of theMsg
>        end if 
>   end try
>   set AppleScript's text item delimiters to {""}
>   set display name of sender of theMsg to dName
>   set address of sender of theMsg to eAddress

-- 
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/>


--
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives:
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to