Text as list
Text as list
- Subject: Text as list
- From: IMAPRH/privat <email@hidden>
- Date: Sun, 8 Jun 2008 10:33:06 +0200
Hi, I have a file where some links are saved:
WWW.chessmaniac.com WWW.chesscenter.com WWW.nabiscoworld.com WWW.guardian.co.uk
They are separated by carriage returns. I want them to appear in a list. Somehow I cant get this to work:
property vCR : return set the text item delimiters to vCR set thePath to ("/Users/ronny/Documents/DEVs/ASS/Links.text" as POSIX file) set link_names to the words of (read file thePath) as list
The result is: {"WWW", "chessmaniac", "com", "WWW", "chesscenter", "com", "WWW", "nabiscoworld", "com", "WWW", "guardian", "co", "uk"}
This also separates at the periods. What I dont understand. I thought that defining text item delimiters to return, separates only at returns?
I also tried set link_names to (read file thePath) as list which results in {"WWW.chessmaniac.com WWW.chesscenter.com WWW.nabiscoworld.com WWW.guardian.co.uk"}
What is wrong in my script?
Any hints?
|
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden