• 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
Text as list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?

Regards, Ronald
--- 
 _______________________________________________
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

  • Follow-Ups:
    • Re: Text as list
      • From: "Mark J. Reed" <email@hidden>
    • Re: Text as list
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Print Selection
  • Next by Date: Re: Getting recurring event instance for specific day in iCal
  • Previous by thread: Re: Print Selection
  • Next by thread: Re: Text as list
  • Index(es):
    • Date
    • Thread