by Barry Wainwright <barry@[EMAIL PROTECTED]
>
Sep 11, 2008 at 09:02 PM
Barry Wainwright wrote:
> Isabelle M. wrote:
>> Hi-
>>
>> How do you grab that From: john.doe@[EMAIL PROTECTED]
in an AppleScript?
>> I'm writing a Reply to All to an event, but I can't get the sender.
>>
>> Thanks
>>
>> Isabelle
>>
>>
> well, that is a strange omission.
>
> There is no 'from' property for an event, and even though the sender is
> displayed in the notes field in the GUI, it is not accessible by script!
>
> I looks like there is no way of getting the sender by script. :(
>
>
>
>
there is a way - you can parse the 'ical data' of an event:
set eventData to iCal data of theEvent
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"ORGANIZER:MAILTO:"}
set TheSender to first paragraph of text item 2 of eventData
set AppleScript's text item delimiters to oldDelims
I haven't checked this out very far - events originating in Entourage
use the "ORGANIZER:MAILTO:" tag, other systems may have a slight
variation (and TIDs are case sensitive!).
It may get you started...
--
Barry Wainwright
Microsoft MVP