• 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: Read File question - OS 9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read File question - OS 9


  • Subject: Re: Read File question - OS 9
  • From: "Marc K. Myers" <email@hidden>
  • Date: Thu, 08 Aug 2002 17:56:47 -0400
  • Organization: [very little]

> 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.

  • Follow-Ups:
    • Re: Read File question - OS 9
      • From: Christopher Nebel <email@hidden>
    • Re: Read File question - OS 9
      • From: Charles Heizer <email@hidden>
  • Prev by Date: Re: Checking the OS Version
  • Next by Date: Re: 'Save As' JPEG in Acrobat
  • Previous by thread: Re: Checking the OS Version
  • Next by thread: Re: Read File question - OS 9
  • Index(es):
    • Date
    • Thread