home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / hypercar / 4223 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.5 KB

  1. Path: sparky!uunet!bcstec!bcsaic!vanover
  2. From: vanover@bcsaic.boeing.com (Jann VanOver)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: Importing/accessing text files
  5. Message-ID: <87413@bcsaic.boeing.com>
  6. Date: 17 Nov 92 20:35:31 GMT
  7. References: <1992Nov16.155906.8559@jhunix.hcf.jhu.edu>
  8. Organization: Boeing Computer Services AI Center, Seattle
  9. Lines: 33
  10.  
  11. In article <1992Nov16.155906.8559@jhunix.hcf.jhu.edu> crawford@jhunix.hcf.jhu.edu (James E Crawford) writes:
  12. >I am looking for a way to have HyperCard access text files between 100k and
  13. >300k in size. As I understand it, there is a 30k limit to the amount of text
  14. >which can be put into a field. Is there any way around this? or is there any
  15. >way to have HyperCard open the text file?
  16. >
  17.  
  18. Yes, indeed.  The command is "open file"
  19.  
  20. eg.    open file "myFileNameWithFullPath"
  21.        repeat
  22.           read from file "myFileNameWithFullPath" for 20000
  23.           if it = "" then exit repeat
  24.           put it into IJustReadItBuffer
  25.        end repeat
  26.        close file "myFileNameWithFullPath"
  27.  
  28.  
  29. Note:  the "read from file" command has a few different permutations,
  30. like you could 
  31.    read from file "whatever" until return
  32. Check your Hypertalk reference for details.
  33.  
  34. Note 2:  when you read, it puts whatever you read into "it"  You check
  35. for end of file by checking if "it" is empty.
  36.  
  37. As to the 30k limit, that you will have to work with.  Multiple card
  38. fields, or continuing onto another card are one way to handle it.
  39.  
  40. Good Luck!
  41. Jann VanOver
  42. vanover@atc.boeing.com
  43.        
  44.