• 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: 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
References: 
 >Re: reading a file in an applescript. (From: "Mark J. Reed" <email@hidden>)
 >Re: reading a file in an applescript. (From: Doug Meade <email@hidden>)
 >Re: reading a file in an applescript. (From: "Mark J. Reed" <email@hidden>)

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