Re: transfer message from Mail to FileMaker - no "returns" in the message
Re: transfer message from Mail to FileMaker - no "returns" in the message
- Subject: Re: transfer message from Mail to FileMaker - no "returns" in the message
- From: Malcolm Fitzgerald <email@hidden>
- Date: Tue, 29 Apr 2003 12:27:08 +1000
At 1:56 PM +0200 28/4/03, Armin Egginger wrote:
I try to transfer my emails to a filemaker-database. It works, but the
returns in the message block don't work - In AppleScript EventLog
everything seems to be ok, but in FileMaker the message is not with
returns - instead of returns are some squares. I wrote a FileMaker
script to change this to returns, but I don't understand, why the
transfer to FileMaker isn't correct. Any ideas?
At 2:55 PM +0200 28/4/03, Helmut Fuchs wrote:
Hi,
I've never scripted Mail myself, but after reading countless
messages bashing Mail for not being very Mac like, I'd assume the
problem lies in Mail using LF characters for line endings and
FileMaker using the traditional CRs.
The event log doesn't show this, because it's obviously smart enough
to deal with both formats.
Just try to replace LFs with CRs before transferring your data to
FileMaker (untested script follows):
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to Ascii character 10
set cont to text items of cont
set AppleScript's text item delimiters to Ascii character 13
set cont to cont as text
set AppleScript's text item delimiters to prevTIDs
This is the answer, so long as you are passing the content directly
from one application to another or going via the clipboard. Small
jobs are most easily handled in this way.
Larger jobs are performed much more quickly by importing the data
from a file via FMPs "import" command. Typically this is done via CSV
or TAB separated values in a text file. In this case the carriage
return is used as the record delimiter, which causes problems for
data which has carriage returns within fields. In this case, convert
the carriage returns to ascii 11. FMP will automatically convert
ascii 11 to ascii 13 during the import process.
--
Malcolm Fitzgerald
Database Manager
The Australian Society of Authors
phone: 02 9318 0877 fax: 02 9318 0530
http://www.asauthors.org mailto:email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.