Re: Return Delimiter
Re: Return Delimiter
- Subject: Re: Return Delimiter
- From: Peter Waibel <email@hidden>
- Date: Tue, 16 Jan 2007 18:33:35 +0100
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.
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
set TheProcess to item 2 of DataInfo --errors here
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
_______________________________________________
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