At 5:10 PM -0500 10/4/03, [EMAIL PROTECTED] wrote:
>Everything's working fine to use TOLD with SIMS except for one important step:  
>prepending the addresses in the resource fork with an identifier and dropping them 
>into the Submitted folder for reprocessing. It works like a charm when I do it 
>manually.
>
>Does anyone here know RealBasic or some other tool that can knock out a little helper 
>app to check in the "Incoming Mail" folder periodically, take what's there, prepend 
>an identifier to the address(es), and then dump it in the SIMS Submitted folder?

Well, here's something that may help.

This script is attached to my "List submissions" folder, into which AutoShare puts all 
of its incoming messages; it appends a dummy address to the e-mail so that SIMS 
doesn't specify in the headers to whom the message was addressed (so as to preserve 
the "private" names of my lists).

However, I believe that it clearly shows how to manipulate the address list in a SIMS 
message file; if you make the suitable modifications (and make sure that the folder 
stays open; making it a pop-up folder on the desktop will do), it should do the trick 
for you.

-- Needs:
-- GTQ Add String List
-- GTQ Extract String List

property dummyEMail : "[EMAIL PROTECTED]"
property submittedFolder : ""
on adding folder items to this_folder after receiving added_items
        open added_items
end adding folder items to

on open added_items
        set submittedFolder to (path to system folder as string) & "SIMS 
Folder:Submitted:"
        repeat with theItem in added_items
                if the last character of (theItem as text) is not ":" then
                        try
                                set theList to (extract string list from (theItem as 
text) id 8192)
                        on error errtxt number errnum
                                tell application "Finder"
                                        select theItem
                                        move selection to folder submittedFolder
                                end tell
                        end try
                        try
                                if the (count of items in theList) is 1 then
                                        set theList to theList & {dummyEMail}
                                        add string list theList to (theItem as text) 
id 8192 with replacing allowed
                                end if
                                tell application "Finder"
                                        select theItem
                                        move selection to folder submittedFolder
                                end tell
                        on error errtxt number errnum
                                tell application "Finder"
                                        delete theItem
                                end tell
                        end try
                end if
        end repeat
end open

Oh, and here's another script to attach to make sure the folder stays open:

on closing folder window for this_folder
        tell application "Finder"
                open this_folder
                set popup of the window of this_folder to true
        end tell
end closing folder window for

HTH.

Regards
Mark Hartman

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[EMAIL PROTECTED]>.
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
Send administrative queries to  <[EMAIL PROTECTED]>

Reply via email to