• 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: Shane Stanley <email@hidden>
  • Date: Tue, 14 Feb 2012 12:33:09 +1100

Something like:

set bannedList to paragraphs of (read file "Mac HD:path:to:file")
-- delete blank entries at end
repeat while item -1 of bannedList = ""
	set bannedList to items 1 thru -2 of bannedList
end repeat

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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)

  • Prev by Date: Re: Populating a variable from a txt file
  • Next by Date: Re: Populating a variable from a txt file
  • 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