Subject: | |
From: | |
Reply To: | |
Date: | Fri, 6 Jan 2006 11:07:43 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Does anyone have a handy script for exporting delimited email messages from
Clais Emailer 2.0? I have one that moves mail from Outlook 5.0 to a
Hypercard stack, but I can't seem to modify it to work with Emailer. I might
need to start from scratch, or maybe a just don't know how to swap out the
Dictionary terminology to make it work. Here's my custom script to get
Outlook mail to the HC stack:
tell application "Outlook Express"
set countExpInbox to "0"
set countExpSentmail to "0"
set countSizeExceeded to "0"
set myMessages to every message in folder "Inbox"
repeat with currentMsg in myMessages
--set popAcct to name of account of currentMsg
set popAcct to "pobox.com" as string
set senderAddr to address of sender of currentMsg
set msgSubject to subject of currentMsg
set senderName to display name of sender of currentMsg
set msgContent to content of currentMsg
set timeSent to time sent of currentMsg
tell application "HyperCard"
-- activate
set failedFlag to false
try
do script "go to stack Winterland:Files:MLG/Secretary"
-- do script "set lockscreen to TRUE"
do script "domenu new card"
set background field id 6 to msgSubject
set background field id 4 to timeSent as string
do script "send closeField to background field ID 4" --
converts to abbr date and puts secs into hidden field
set background field id 1 to "From: " & senderAddr & " <" &
senderName & ">" & return & "Date: " & timeSent ¬
& return & "To: " & "mbossiere@" & popAcct & return &
"Subject: " & msgSubject & return & return & msgContent
set background field id 7 to "mbossiere@" & popAcct
set background field id 9 to senderAddr
do script "set the hilite of background button Email to
TRUE"
on error
do script "domenu Delete card"
set failedFlag to true
end try
-- do script "set lockscreen to FALSE"
end tell
if failedFlag is true then
move currentMsg to folder "HC-Exceeded 30K (Inbox)"
set countSizeExceeded to (countSizeExceeded + 1)
else
move currentMsg to folder "HC-Exported (Inbox)"
set countExpInbox to (countExpInbox + 1)
end if
end repeat
----
set myMessages to every message in folder "Sent Items"
repeat with currentMsg in myMessages
set popAcct to "pobox.com" as string
set recipAddr to address of recipient 1 of currentMsg
set msgSubject to subject of currentMsg
set senderName to display name of sender of currentMsg
set msgContent to content of currentMsg
set timeSent to time sent of currentMsg
tell application "HyperCard"
-- activate
set failedFlag to false
try
do script "go to stack Winterland:Files:MLG/Secretary"
-- do script "set lockscreen to TRUE"
do script "domenu new card"
set background field id 6 to msgSubject
set background field id 4 to timeSent as string
do script "send closeField to background field ID 4" --
converts to abbr date and puts secs into hidden field
set background field id 1 to "From: " & "mbossiere@" &
popAcct & return & "Date: " & timeSent ¬
& return & "To: " & address of recipAddr & return &
"Subject: " & msgSubject & return & return & msgContent
set background field id 7 to address of recipAddr
set background field id 9 to "mbossiere@" & popAcct
do script "set the hilite of background button Email to
TRUE"
on error
do script "domenu Delete card"
set failedFlag to true
end try
-- do script "set lockscreen to FALSE"
end tell
if failedFlag is true then
move currentMsg to folder "HC-Exceeded 30K (Sent Mail)"
set countSizeExceeded to (countSizeExceeded + 1)
else
move currentMsg to folder "HC-Exported (Sent Mail)"
set countExpSentmail to (countExpSentmail + 1)
end if
end repeat
activate
-- display dialog countExpInbox & " incoming emails exported." & return
& countExpSentmail & " sent emails exported."
display dialog (countExpInbox + countExpSentmail) & " messages
exported." as text
end tell
|
|
|