Re: Entourage Rule to modify incoming email message source
Re: Entourage Rule to modify incoming email message source
- Subject: Re: Entourage Rule to modify incoming email message source
- From: "Laine Lee" <email@hidden>
- Date: Thu, 26 Oct 2006 13:33:15 -0500
Thank you Gary (Lists), Philip Kearney, Allen Watson, John C. Welch, and Paul Berkowitz. Chances are more iterations of the undesired code will occur so I'll probably just throw in a list of each possible interspersion of "=" and ascii character 13 in the string "DEFANGED_".
------
set theFile to ((path to desktop from user domain) as string) & "ReFANGtarget.eml"
tell application "Microsoft Entourage"
set theMessageList to the selection -- (This can be changed to " set theMessageList to current messages as list" to be used in conjunction with a rule)
save item 1 of theMessageList in theFile
delete theMessageList
end tell
repeat
try
set r to read alias theFile
set _fixed to my remove_DEFANGED_(r, "DEFANGED_")
set _fixed to my remove_DEFANGED_(_fixed, "D=" & (ASCII character 13) & "EFANGED_")
set _fixed to my remove_DEFANGED_(_fixed, "DEFANGE=" & (ASCII character 13) & "D_")
set _fixed to my remove_DEFANGED_(_fixed, "DEFANGED=" & (ASCII character 13) & "_")
set _fixed to my remove_DEFANGED_(_fixed, "D=" & (ASCII character 10) & "EFANGED_")
set _fixed to my remove_DEFANGED_(_fixed, "DEFANGE=" & (ASCII character 10) & "D_")
set _fixed to my remove_DEFANGED_(_fixed, "DEFANGED=" & (ASCII character 10) & "_")
exit repeat
delay 1
on error ther
display dialog ther
end try
end repeat
tell application "Microsoft Entourage"
make new incoming message at folder "inbox" with properties {source:_fixed, read status:read}
end tell
on remove_DEFANGED_(this_text, bad_string)
set AppleScript's text item delimiters to the bad_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to ""
set this_text to the item_list as string
return this_text
end remove_DEFANGED_
------
Laine Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden