Re: Read File question - OS 9
Re: Read File question - OS 9
- Subject: Re: Read File question - OS 9
- From: Charles Heizer <email@hidden>
- Date: Thu, 08 Aug 2002 15:16:04 -0700
Awesome!
Thanks Marc!
- Charles
On 8/8/02 2:56 PM, "Marc K. Myers" <email@hidden> wrote:
>
> Date: Thu, 08 Aug 2002 11:35:53 -0700
>
> Subject: Read File question - OS 9
>
> From: Charles Heizer <email@hidden>
>
> To: AS users <email@hidden>
>
>
>
> Hello,
>
> I would like to read the 4th line of this file and from the 8th char, but I
>
> keep getting a error.
>
>
>
> Can someone please help,
>
>
>
> Thanks,
>
>
>
> - Charles
>
>
>
> Here is my test code -
>
>
>
> 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)
>
>
Marc K. Myers <email@hidden>
>
http://AppleScriptsToGo.com
>
4020 W.220th St.
>
Fairview Park, OH 44126
>
(440) 331-1074
>
>
[8/8/02 5:56:13 PM]
>
_______________________________________________
>
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.
_______________________________________________
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.