• 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: Delimiting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delimiting


  • Subject: Re: Delimiting
  • From: Daniel Jalkut <email@hidden>
  • Date: Sat, 03 Sep 2005 12:51:43 -0400

Hi Bob - if I understand what you're trying to do, then wouldn't it be easier to use two newlines as your text item delimiters?

set myTestData to "hello
there

these
are
my
fields

separated by double newlines"

set myDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "\n\n"
set myItems to text items of myTestData
set AppleScript's text item delimiters to myDelim
myItems

On Sep 3, 2005, at 10:59 AM, Robert Poland wrote:

Hi,

I have a script that uses a <return> for delimiting. I use a repeat loop to extract data with two <return>s to separate blocks.
The problem I'm having is how to reinsert the <return>s between lines of recovered data within the block. In the example below the return is ignored.


set TheDescription to ""
repeat with i from 3 to {iCount}
set x to (myList's text item i)
if x = "" then exit repeat
if TheDescription = "" then
set TheDescription to x
else
set TheDescription to TheDescription & ". " & (return) & x
end if
end repeat
if TheDescription ‚ "" then set TheDescription to TheDescription & "."


Tia,
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40red-sweater.com


This email sent to 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: This email sent to email@hidden
References: 
 >Delimiting (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: still having trouble with SOAP
  • Next by Date: Re: Delimiting
  • Previous by thread: Delimiting
  • Next by thread: Re: Delimiting
  • Index(es):
    • Date
    • Thread