Eudora applescript needs updating

Hi,
I have a script that runs moves email from Eudora to Filemaker Pro. It ran flawlessly using Filemaker 5.5v2 but doesn’t work quite right in Filemaker 7. I’m afraid I have only a very limited understanding of AppleScript. It’s only importing one message, and it’s only bringing in the Inquiry Name.

If anybody sees anything obvious here that needs to be changed, would you kindly let me know? Thanks! Sally

tell application “Eudora”
set theMailbox to “In”
set numMessages to count every message of mailbox theMailbox
repeat with msgNum from 1 to numMessages
set msg1 to (a reference to message msgNum of mailbox theMailbox)
set address to field “From” of msg1
set aa to the offset of “<” in address
if (aa ≠0) then
set az to the offset of “>” in address
if (az ≠0) then set address to text (aa + 1) thru (az - 1) of address
else
set aa to offset of “:” in address
set az to (offset of “(” in address) - 1
if az = 0 then set az to length of address
set address to text from (aa + 1) to az of address
end if
set iName to sender of msg1
set iSubject to subject of msg1
set iDate to message date of msg1
set iEmail to address
set iBody to field “” of msg1
tell application “FileMaker Pro”
create new record
set data of cell “InquiryName” of last record to iName
set data of cell “EmailReplySubject” of last record to iSubject
set data of cell “InquiryDate” of last record to iDate
set data of cell “InquiryEmail” of last record to iEmail
set data of cell “InquiryComment” of last record to iBody
end tell
log numMessages - msgNum
end repeat
end tell