Mail applicatin and Filemaker Pro 6:PLEASE HELP ME

Please Help Me:
When I received a New message in mail application, i will that this message is transfered in a new record in Filemaker Pro with field “subject” in mail = fied “subject” in Filemaker Pro, sender…

Which part do you need help with?

this works:
tell application “Mail”
set a to selected messages of message viewer 1
–returns a list of message(s)
set b to subject of (item 1 of a) --<–<
end tell
tell application “FileMaker Pro”
set cell “tekst” of the current record of database “testenscript” to b
end tell