Tom Dillon wrote:

>When using the scrip below, the variable 'theSender' is always populated
>with what looks like Chinese characters rather than the sender's name
>and email address as I would have expected.

If you examine carefully PowerMail's dictionary in AppleScript Editor, you will 
see that the type of "sender" is not "text", but "address"; address itself has 
two text properties: "display name" and "email address". So the correct syntax 
is something like this:

set theFD to return & "----------" & return

tell application "PowerMail"
        set theMessages to current messages
        repeat with msg in theMessages
                set theSender to sender of msg
                set theTitle to subject of msg as text
                set theTime to time received of msg as text
                set theBody to content of msg as text
                
                set theText to (display name of theSender) & " " & (email 
address of theSender) & theFD & theTitle & theFD & theTime & theFD & theBody & 
theFD
                set the clipboard to theText
        end repeat
end tell


Jérôme - CTM Engineering


---------------------------------------------------------------------
   "After a month of Tiger, I'd gone back to CTM's excellent FoxTrot
    Personal Search for finding documents by content"
  Andrew Orlowski - www.reghardware.co.uk

         Download a demo version from www.foxtrot.ch
---------------------------------------------------------------------


Reply via email to