• 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: Ed Stockly <email@hidden>
  • Date: Thu, 27 Mar 2008 08:32:55 -0700

I see the problem now:

Microsoft Entourage got an error: Can't continue readHandle.

This is a terminology conflict.
Microsoft is using work "read" in the Entourage dictionary, which causes the compile error.
One solution is to create a handler:
on ReadMyFile (targetFile)
       return read targetFile
end ReadMyFile
tell application "Microsoft Entourage"
 my ReadMyFile (targetFile)
  set fileText to the result
  display dialog fileText
end tell

HTH,

ES
On Mar 27, 2008, at 8:21 AM, Doug Meade wrote:
Thanks Ed,

I tried:
set fileText to read
theTextFile

As  you suggested.
I still get the following compile error:
Expected end of line, etc. but found identifier.

I get it in the word after “read” every time.


I should also mention that when I try the following syntax:
     set fileText to {read, readHandle for (get eof readHandle)}
 I get the following error:
 Microsoft Entourage got an error: Can't continue readHandle.
 
=
 _______________________________________________
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

  • Follow-Ups:
    • 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: 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