Re: reading a file in an applescript.
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