• 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 21:54:31 +0100

On 20 Oct 2005, at 19:25, Walter L. wrote:

I'd like to isolate and break down the text into sections, put each section into a list or new string, then rebuild it controlling the spacing between paragraphs. There would also be no broken sentences.

This is starting to go over my head, but I know that you can split strings using delimiter characters. The 'text items' feature will give you a list of text items using those delimiters. For example,


tell application "Mail"
    set AppleScript's text item delimiters to ASCII character 10
    repeat with m in (get selection)
        set t to content of m
        log class of text items of t
        log (count text items of t)
    end repeat
end tell

Now you've got a list of 'lines' which were divided up with ASCII 10 characters.

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: string Manipulation
  • Previous by thread: re: string Manipulation
  • Next by thread: Re: string Manipulation
  • Index(es):
    • Date
    • Thread