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

References: 
 >Re: Read File question - OS 9 (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: Re: Launching a script from a Unix window
  • Next by Date: comparing two filemaker databases
  • Previous by thread: Re: Read File question - OS 9
  • Next by thread: Re: Read File question - OS 9
  • Index(es):
    • Date
    • Thread