• 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: reading a file in an applescript.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading a file in an applescript.


  • Subject: Re: reading a file in an applescript.
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 21 Mar 2008 14:45:19 -0700

On Mar 21, 2008, at 1:57 PM, Doug Meade wrote:
Nope still fails to compile

Where does it error on the compile?

I got this to compile and run:

set replyTemplateName to "foobar.txt"
tell application "Finder"


set theScriptPath to (container of (path to me)) as text


end tell

set the TextFile to (theScriptPath & replyTemplateName)

set targetFile to the TextFile as alias

set readHandle to (open for access TextFile)
set fileText to (read readHandle)
close access readHandle
display alert fileText

--
"If I were not an atheist, I would believe in a God who would choose to save people on the basis of the totality of their lives and not the pattern of their words. I think he would prefer an honest and righteous atheist to a TV preacher whose every word is God, God, God, and whose every deed is foul, foul, foul."  -- Isaac Asimov


 _______________________________________________
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: 
 >Re: reading a file in an applescript. (From: Doug Meade <email@hidden>)

  • Prev by Date: Re: reading a file in an applescript.
  • Next by Date: Re: getting return from apple event
  • Previous by thread: Re: reading a file in an applescript.
  • Next by thread: Re: reading a file in an applescript.
  • Index(es):
    • Date
    • Thread