Title: Re: received message timing
On 21/7/04 11:57 pm, "Hanagan" <[EMAIL PROTECTED]> wrote:
> WOW!!!
> How's that for service!!!! ;-)
You're welcome.
However, I had second thoughts about the script - as it was written, it would extract the date from the LAST Received header, not the first. Here's a tweaked version (which will be slightly quicker):
-- Correct the date v1.0 25th June 2002
-- (Modified 22/7/2004 to set Time Received to First Received Header date)
-- a script for Microsoft Entourage by Barry Wainwright
-- Resets the date of messages to the date of the first received header
-- useful for messages with badly formatted (or just plain wrong) dates
tell application "Microsoft Entourage"
set theMessages to current messages
if theMessages is {} then
display dialog "No messages selected!" buttons {"Stop"} default button 1 with icon stop
return -99
end if
repeat with theMess in theMessages
set theHeaders to the headers of theMess
set AppleScript's text item delimiters to {return & space}
set theHeaders to text items of theHeaders
set AppleScript's text item delimiters to {space}
set theHeaders to theHeaders as string
set AppleScript's text item delimiters to {return & tab}
set theHeaders to text items of theHeaders
set AppleScript's text item delimiters to {space}
set theHeaders to theHeaders as string
set theHeaders to the paragraphs of theHeaders
set receivedHeader to ""
repeat with aHeader in theHeaders
if aHeader starts with "Received:" then copy contents of aHeader to receivedHeader
exit repeat
end repeat
set AppleScript's text item delimiters to {";"}
set theDate to (last text item of receivedHeader)
set time received of theMess to date theDate
end repeat
end tell
>
> Good sir, I bow to your generosity.
> I'm going to go headlong into looking into what to do with a script, and
> once I get that figured out I'll let you know how it worked out.
Copy the script from the message window and paste it into a new script window in Apple's 'Script Editor'. Save the script as a compiled script & put it in the ‘Entourage Script Menu Items’ folder in your ‘Microsoft User Data’ folder. The script can be manually run from the menu or called as an action in a mail rule.
>
> Thank you a bunch.
>
> ht
> P.S.
> You wouldn't happen to have one of those scripty things up your sleeve that
> will allow the toolbar to be customized/rearranged? Now THAT would be a
> veritable life saver!! ;-)
Sorry, but that can't be done :(
>
--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
<http://www.entourage.mvps.org/>
- received message timing Hanagan
- Re: received message timing Barry Wainwright
- Re: received message timing Hanagan
- Re: received message timing Barry Wainwright
- Re: received message timing Hanagan
- Re: received message timing Barry Wainwright
- Re: received message timing Hanagan
- Re: received message timing Paul Berkowitz
- Re: received message timing Hanagan
- Re: received message timing Paul Berkowitz
- Re: received message timing Barry Wainwright
- Re: received message timing Barry Wainwright
- Re: received message timing Allen Watson
- Re: received message timing Allen Watson
- Re: received message timing Barry Wainwright
- Re: received message timing Allen Watson
