• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: string manipulation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string manipulation


  • Subject: Re: string manipulation
  • From: pete boardman <email@hidden>
  • Date: Thu, 20 Oct 2005 17:38:06 +0100

On 20 Oct 2005, at 17:15, Walter L. wrote:

I'm new to AppleScripting. I understand the language, but am having difficulty with string manipulation. I enjoy what little I can do so far. I love this stuff.

I think many of us do really, despite all the grumbling... :-)

How do I extract each line of text from an email, without the "\n" or "\r" at the end of each line, while maintaining the punctuation and paragraph structure of the original string.

Here's something to start the ball rolling:

--
tell application "Mail"
    repeat with m in (get selection)
        set t to content of m
        log "this is the entire text: " & t
        repeat with p in paragraphs of t
            log "this is a paragraph: " & p
            repeat with c in p
                log c -- these are the characters
            end repeat
        end repeat
    end repeat
end tell
--

Pete

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >re: string manipulation (From: "Walter L." <email@hidden>)

  • Prev by Date: Re: Days and hours
  • Next by Date: Re: Days and hours
  • Previous by thread: re: string manipulation
  • Next by thread: re: string Manipulation
  • Index(es):
    • Date
    • Thread