With this code I want the content of an email to be placed in filemaker (textfield).
set theSource to content of eachMessage
tell application "FileMaker Pro" to set cell CellVier to theSource
The content is in Filemaker, but there is a small problem…
There are NO returns. The text is one line off text with many of this [].
I found that this character is a html code or some other non-ASCII code??
How get this turned into an end off line (return/enter)?
Hi Andre. This is very easy to fix. Here’s the code:
set theSource to content of eachMessage
if theSource contains "[]"
set oldDelims to applescript's text item delimiters
set applescript's text item delimiters to "[]"
set theSource to text items of theSource as list
set applescript's text item delimiters to (ascii character 13)
set theSource to items of theSource as string
set applescript's text item delimiters to oldDelims
end if
tell application "FileMaker Pro" to set cell CellVier to theSource
No problem. To learn more about the technique I used check out the article “Text Item Delimiters are De-limitless” on the unScripted section of MacScripter. This is a very powerful tool in AppleScript development.