Re: ctrl m question
Re: ctrl m question
- Subject: Re: ctrl m question
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 15 Dec 2006 16:01:24 -0500
So you have a line of text from an email message in an AppleScript
variable as a string. For whatever reason, the text is still in its
encoded form, with equal signs to indicate soft returns, so you want
to chop off any ("=" & return) off the end. (No newline after the
return?)
Any reason why this wouldn't work?
if theLine ends with ("=" & return) then
set theLine to (characters 1 through ((length of theLine) - 2)
of theLine) as string
end if
On 12/15/06, John C. Welch <email@hidden> wrote:
On 12/15/06 14:12, "Mark J. Reed" <email@hidden> wrote:
>> I'm not looking specifically for a "do shell script solution", but I do need
>> it to be something that won't require any additional OSAXen. I just need to
>> be able to strip the last two characters off of a line including the EOL, so
>> that it mates up with the line that follows. I can probably do this in
>> vanilla applescript, but I've been dealing with Websphere headaches and my
>> brain is fried, so there's an obvious answer but I just can't see it
>
> It partly depends on what you're doing with the lines. Are you
> writing to a file, building a single big string in AppleScript, making
> a list of lines, or what?
Writing to a file. The number of spaces between items is immaterial, nor are
the quotes a problem since it's eventually going into Excel.
--
My milkshake bringeth alle ye gentlefolke to the yard
And they're like, it's better than thine.
Verily! It's better than thine!
I covld teach yov,
Bvt
I mvst leavy a fee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden