Re: Read File question - OS 9
Re: Read File question - OS 9
- Subject: Re: Read File question - OS 9
- From: Christopher Nebel <email@hidden>
- Date: Thu, 8 Aug 2002 19:06:23 -0700
On Thursday, August 8, 2002, at 02:56 PM, Marc K. Myers wrote:
tell application "Finder"
activate
set theEDMFile to (file "EDM Settings" of preferences folder)
set myData to (read theEDMFile as {text} using delimiter {return})
set myData to item 4 of myData
set myData to (read myData from 8)
display dialog myData
end tell
You can't "read" a text variable, which is what "myData" is. You can
only read a file. You need to replace
set myData to (read myData from 8)
with
set myData to (text 8 thru -1 of myData)
By the way -- lose the braces around "text". The only reason that's
supported at all is because it appears in an example in the Scripting
Additions Guide; it has no meaning.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.