Soft returns in string variable?
Soft returns in string variable?
- Subject: Soft returns in string variable?
- From: dave dowling <email@hidden>
- Date: Wed, 4 Feb 2004 07:13:37 -0500
I'm doing some scripting with Apple Mail. If I manually copy all the
text from the body of an email, I can set a variable to the clipboard
like this:
[do manual copy]
set myParseText to the clipboard
etc...
and my script works fine. However, if I have AS set a variable with
the content of the email message like this:
set myParseText to (content of myMsg)
or this:
set myParseText to (content of myMsg) as string
or even this:
set the clipboard to (content of myMsg) as string
set myParseText to the clipboard
I get non-ASCII characters in my resulting string. When I copy the
unwanted characters into BBEdit and choose to show invisibles, they
show up as carriage returns. In FileMaker Pro, which is the end point
for my text variable, I get little squares instead of legible
characters. I know I can zap gremlins in BBEdit to get rid of the
unwanted characters, but I'm hoping there's a way to strip them in AS
alone. I really don't care about adding any other applications to my
script.
Any idea why a manual copy to the clipboard would be different from an
AS copy to the clipboard? More important, any idea how I can set a
variable and strip out the non-ASCII characters?
Thanks.
Dave Dowling
http://www.davedowling.com
Free at last! How I found peace with God:
http://www.davedowling.com/peace.htm
_______________________________________________
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.