• 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: Populating a variable from a txt file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Populating a variable from a txt file


  • Subject: Re: Populating a variable from a txt file
  • From: email@hidden
  • Date: Mon, 13 Feb 2012 20:32:37 -0800

Shane,

It works as-is. Many times the last character of a file is a return, and when you read and get the paragraphs, the last item in the list will be an empty string. This checks for that, and removes it if necessary.

I can't see any way it can empty bannedList...

Well, I'm sure it's something I'm doing then.  It's odd, though.  If I use just the first line you sent me, bannedList is populated just fine.  However, when I add the other lines, bannedList is empty.  I'd like to use those extra lines of code to be on the safe side, but maybe they're not required.  Even with extra returns at the end of the list, set bannedList to paragraphs of (read file "Mac HD:path:to:file") does not see them, so I guess it's fine with just that one line.

Thanks again,
Marc
 _______________________________________________
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

References: 
 >Populating a variable from a txt file (From: email@hidden)
 >Re: Populating a variable from a txt file (From: Stan Cleveland <email@hidden>)
 >Re: Populating a variable from a txt file (From: email@hidden)
 >Re: Populating a variable from a txt file (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Populating a variable from a txt file
  • Next by Date: identify text based on paragraph style
  • Previous by thread: Re: Populating a variable from a txt file
  • Next by thread: Re: Populating a variable from a txt file
  • Index(es):
    • Date
    • Thread