• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mail and FileMaker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail and FileMaker


  • Subject: Mail and FileMaker
  • From: Mike Matthews <email@hidden>
  • Date: Wed, 18 Jul 2007 09:29:04 -0700

Hi:

Thought I'd turn toward the group rather than beating my head against a wall for another day.

I want to copy the recipient name, recipient email address, and content from an outgoing email message in Mail.app to a record in a FileMaker Pro 8 database.

But I'm having trouble in two areas:
(1) Getting the recipient name, recipient email address, and content from the outgoing message window. (References like front window don't seem to work with Mail.app)

(2) Once I have these three pieces of data in variables, I want to search for the recipient name in the FileMaker Pro database. If there is no existing record for the recipient name, I want to create a new record. I think have the code in place to create the new record, but I get an error message when I run the script--so I need code to work around that.

This is probably pretty simple, but I'm having a hard time getting the syntax right.

Here's what I have so far:

tell application "Mail"
--I need language to copy data in fields to variables: name to thePerson, address to theEmail, content to theContent
end tell

--switch to FileMaker
tell application "FileMaker Pro Advanced"
activate

--Switch to Data Entry layout, start at the first record, and find the recipient
go to layout "Data entry"
show every record
do menu menu item "Show All Records" of menu "Records"
go to first record
show (first record whose cell "person" = thePerson)

--if this is a new recipient
--I need something here to catch the error generated by the previous uncommented line
set theRecord to create new record
tell theRecord
set cell "person" to thePerson
set cell "email" to theEmail
set cell "summary" to theContent
end tell
save record

else

--if this is an existing recipient
do script "Clone a record"
save record
set cell "summary" of current record to theContent

end if
end tell

TIA,
Mike

 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mail and FileMaker
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: RAM and CPU hogging
  • Next by Date: Re: Mail and FileMaker
  • Previous by thread: Re: RAM and CPU hogging
  • Next by thread: Re: Mail and FileMaker
  • Index(es):
    • Date
    • Thread