OE reply to list
OE reply to list
- Subject: OE reply to list
- From: Andy Wylie <email@hidden>
- Date: Mon, 26 Aug 2002 18:23:24 +1200
after several false starts finding the provided tools wanting I got this
skanky thing together...
property sig : return & return & "Don't touch"
property defAdd : "email@hidden"
property defAcc : missing value
if defAcc = missing value then gDefAcc()
doReply()
to doReply()
set cont to ""
tell application "Outlook Express"
activate
try
set mess to window 1's displayed message
tell selection to if it is not "" then set {cont, footCut} to
{it, -1}
close window 1
on error number n
if n = -1728 then
tell (get selection) to if it = "" then
return
else
set mess to its item 1
end if
end if
end try
if cont = "" then set {cont, footCut} to {mess's content, -268}
set {sndName, sndAdd, subj, heder} to mess's {sender's name,
sender's address, subject, headers}
end tell
if subj's word 1 is not "Re" then set subj to "Re: " & subj
if sndName = "" then set sndName to sndAdd
set AppleScript's text item delimiters to ("Date:")
set myHead to heder's text item 2's paragraph 1
set AppleScript's text item delimiters to ("")
set myHead to {"on", myHead, " ", sndName, " wrote:", return, return,
">"} as string
set cont to (cont as string)'s text 1 thru footCut
set AppleScript's text item delimiters to (return)
set cont to cont's text items
set AppleScript's text item delimiters to (return & ">")
set cont to cont as string
set AppleScript's text item delimiters to ("")
set cont to myHead & cont & sig
tell application "Outlook Express"
make new draft window with properties {recipient:{sndAdd, defAdd},
subject:subj, account:POP account id defAcc, content:cont}
end tell
end doReply
on gDefAcc()
tell application "Outlook Express"
tell POP accounts
set {x, xx} to {its ID, its name}
end tell
end tell
choose from list xx with prompt "Default reply account"
if result = false then
error number -128
else
set acc to result's item 1
end if
repeat with n from 1 to count xx
if xx's item n = acc then
set defAcc to x's item n
exit repeat
end if
end repeat
end gDefAcc
--BTW does it bother any other OE 5.0.5 users it's oblivious to input until
-- completely launched? (5.0.3 wasn't)
_____________________________ Andy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.