Eudora to Filemaker using Applescript

i was able to retrieve “to”, “cc”, “subject”, “body” from Eudora inbox using applescript.
how will i saved these values to filemaker using applescript.

I’m not much of a FileMaker expert when it comes to scripting but this works for me. Create a database named “email” and save it in a location of your choice. Create the following fields: to, from, cc, subject and body.

Modify the following script to include the correct path to your newly created database file (the line that tells FileMaker to open alias bla bla bla). Once this is done, the script should work.

 tell application "Eudora"
  set inbox to (a reference to mailbox ":in")
  set cnt to count messages of inbox
 end tell

 tell application "FileMaker Pro" to open alias "path:to:email.fp5" -- use the appropriate extension for your version of FMP

 repeat with i from 1 to cnt
  tell application "Eudora"
   tell message i of inbox
    set _to to field "to"
     set _cc to field "cc"
    on error
     set _cc to ""
    end try
    set _from to field "from"
    set _subject to field "subject"
    set _body to field ""
   end tell
  end tell
  tell application "FileMaker Pro"
   tell database "email"
    set nr to (create new record at end)
    tell nr
     set cell "to" to _to
     try -- it might be empty
      set cell "cc" to _cc
     end try
     set cell "from" to _from
     set cell "subject" to _subject
     set cell "body" to _body
    end tell
   end tell
  end tell
 end repeat

– Rob

it worked, thanks a lot!

please help me once more :slight_smile:

variable1 = “To:
variable2 = “

how do i make a script to make variable1 change to variable2 by deleting the "To: " string?

or how do i remove “To:” in variable1

thanks a lot.

This might work.

set variable1 to "To: "
set variable2 to (characters 5 thru end of variable1) as string

– Rob