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

Re: Return Delimiter


  • Subject: Re: Return Delimiter
  • From: Steven Valenti <email@hidden>
  • Date: Tue, 16 Jan 2007 15:12:13 -0500

Setting a variable to every paragraph will do the trick. The delimiter worked with a space but not the return key. I also found that if I used the code
set DataInfo to read MyRefNumber using delimiter "
as list for 500
and compiled it in Script Debugger then moved it to the other machine and didn't ever compile it with Script Editor, it remained working.

Thanks for the help!


I wish to add that I am not sure that the delimiter defined by the script is a return.
If I remember well, the Script Editor in 10.4.8 defaults to linefeed.

Try this:

set fileContentAsText to read file xxxxxxxx
set fileContentAsList to every paragraph of fileContentAsText

As far as I know
"every paragraph" is considering return and newline.

Peter

On Jan 16, 2007, at 12:09 PM, Adam Bell wrote:


Several things to worry about. Most likely in this case is that file myRefNumber isn't return delimited - it's using unix endings (ASCII character 10, or it's from a Windows machine using return & lineFeed (ASCII character 10). Finally, if the text is unicode, you'll have to account for that.


At 11:54 AM -0500 1/16/07, Steven Valenti wrote:
I'm trying to set my delimiter to "Return" reading a file but it's not work in Script Editor. Funny thing is that it does work in Script Debugger but this isn't on the machine I'm deploying it to so I wish to make it work with Script Editor. I end up with just a list of 1 item so the last line errors. Anyone know anything about this or do I need to make a return character differently? I simply hit a return in between two quotes.

set DataInfo to read MyRefNumber using delimiter "
as list for 500
TheProcess to item 2 of DataInfo
--errors here

 _______________________________________________
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
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:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

References: 
 >Return Delimiter (From: Steven Valenti <email@hidden>)
 >Re: Return Delimiter (From: Adam Bell <email@hidden>)

  • Prev by Date: Re: Text items
  • Next by Date: response from port
  • Previous by thread: Re: Return Delimiter
  • Next by thread: Using list of indices
  • Index(es):
    • Date
    • Thread