Re: reading a file in an applescript.
Re: reading a file in an applescript.
- Subject: Re: reading a file in an applescript.
- From: KOENIG Yvan <email@hidden>
- Date: Fri, 21 Mar 2008 21:40:13 +0100
Le 21 mars 2008 à 21:31, Mark J. Reed a écrit :
set replyTemplateName to "repl.txt"
set myPath to (path to me)
tell application "Finder" to set myFolder to (container of myPath)
as text
set targetFile to myFolder & replyTemplateName
set readHandle to open for access targetFile
set fileText to read readHandle for get eof readHandle
close access readHandle
fileText
Why not
set replyTemplateName to "repl.txt"
set myPath to (path to me)
tell application "Finder" to set myFolder to (container of myPath) as
text
set targetFile to myFolder & replyTemplateName
set fileText to read (targetfile as alias)
fileText
Yvan KOENIG _______________________________________________
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