Re: reading a file in an applescript.
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 10:56:56 -0400
- Thread-topic: reading a file in an applescript.
Title: Re: reading a file in an applescript.
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.
Doug
From: Doug Meade <email@hidden>
Date: Thu, 27 Mar 2008 10:49:56 -0400
To: <email@hidden>
Conversation: reading a file in an applescript.
Subject: Re: reading a file in an applescript.
Firstly thanks to everyone for the many helpful tips.
Not sure why none of them work so well.
I’m going to be upgrading to leopard today I think – maybe that will help.
Anyway I got the compile error to stop...
I had to add an ,
So I changed
set fileText to {read readHandle}
To
set fileText to {read, readHandle}
But now when I try to display the content of the file that was read I get an error.
(this time it’s a run time error)
The error is:
Microsoft Entourage got an error: Can't make {read, 1143} into type string.
I’ve tried the following 3 methods of displaying the text from the file:
- display alert fileText
- display dialog fileText
- fileText
Thanks!
Doug
From: Doug Meade <email@hidden>
Date: Fri, 21 Mar 2008 15:35:33 -0400
To: <email@hidden>
Conversation: reading a file in an applescript.
Subject: reading a file in an applescript.
Hi folks!
New to applescript ...
I'm trying to read a file in an applescript.
I've tried a number of different syntax options.
The most simple is:
read theTextFile
I get the following error:
Expected end of line, etc. but found identifier.
But this is the most basic syntax I've found.
Any ideas?
(I’m running OSX – not leppord)
_______________________________________________
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
_______________________________________________
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