home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!bcstec!bcsaic!vanover
- From: vanover@bcsaic.boeing.com (Jann VanOver)
- Newsgroups: comp.sys.mac.hypercard
- Subject: Re: Importing/accessing text files
- Message-ID: <87413@bcsaic.boeing.com>
- Date: 17 Nov 92 20:35:31 GMT
- References: <1992Nov16.155906.8559@jhunix.hcf.jhu.edu>
- Organization: Boeing Computer Services AI Center, Seattle
- Lines: 33
-
- In article <1992Nov16.155906.8559@jhunix.hcf.jhu.edu> crawford@jhunix.hcf.jhu.edu (James E Crawford) writes:
- >I am looking for a way to have HyperCard access text files between 100k and
- >300k in size. As I understand it, there is a 30k limit to the amount of text
- >which can be put into a field. Is there any way around this? or is there any
- >way to have HyperCard open the text file?
- >
-
- Yes, indeed. The command is "open file"
-
- eg. open file "myFileNameWithFullPath"
- repeat
- read from file "myFileNameWithFullPath" for 20000
- if it = "" then exit repeat
- put it into IJustReadItBuffer
- end repeat
- close file "myFileNameWithFullPath"
-
-
- Note: the "read from file" command has a few different permutations,
- like you could
- read from file "whatever" until return
- Check your Hypertalk reference for details.
-
- Note 2: when you read, it puts whatever you read into "it" You check
- for end of file by checking if "it" is empty.
-
- As to the 30k limit, that you will have to work with. Multiple card
- fields, or continuing onto another card are one way to handle it.
-
- Good Luck!
- Jann VanOver
- vanover@atc.boeing.com
-
-