Re: Populating a variable from a txt file
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