• 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: Doug Meade <email@hidden>
  • Date: Thu, 27 Mar 2008 11:43:35 -0400
  • Thread-topic: reading a file in an applescript.

Title: Re: reading a file in an applescript.
Doh!

Scope issue.
Of course.

I’ll get it swapped out and report back if it fails... But this makes way too much sense to not be the problem.

Thanks Ed!
(and everyone – guess I’ve just been looking to close at the tree and missed the forest)


Doug




From: Ed Stockly <email@hidden>
Date: Thu, 27 Mar 2008 08:32:55 -0700
To: "email@hidden Users" <email@hidden>
Subject: Re: reading a file in an applescript.

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
 _______________________________________________
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: Ed Stockly <email@hidden>)

  • Prev by Date: Re: reading a file in an applescript.
  • Next by Date: Re: order of files in Finder vs. file index number
  • Previous by thread: Re: reading a file in an applescript.
  • Next by thread: Re: reading a file in an applescript.
  • Index(es):
    • Date
    • Thread