home *** CD-ROM | disk | FTP | other *** search
- From: bayes@hplvec.LVLD.HP.COM (Scott Bayes)
- Date: Tue, 25 Aug 1992 22:08:50 GMT
- Subject: Re: First 80 chars?
- Message-ID: <1170022@hplvec.LVLD.HP.COM>
- Organization: Hewlett-Packard Co., Loveland, CO
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!hpscdc!hplextra!hpfcso!hplvec!bayes
- Newsgroups: comp.sys.mac.hypercard
- References: <1992Aug24.152115.20557@ncar.ucar.edu>
- Lines: 27
-
- > on handler
- > repeat forever
- > if cd fld "xyz" is empty then exit repeat
- > put char 1 to 80 of cd fld "xyz" & return after <container>
- > delete char 1 to 80 of cd fld "xyz"
- > end repeat
- > end handler
- >
-
- Neither have I tried it, but I think you first (before the repeat) want
- to copy the field to a container (get cd fld "xyz"), then use the
- container in the manipulation:
-
- on handler
- get cd fld "xyz"
- repeat forever
- if it is empty then exit repeat
- put char 1 to 80 of it & return after <container>
- delete char 1 to 80 of it
- end repeat
- end handler
-
- The reason being that operations that change fields always seem to hit
- the disk, causing your script to probably be very slow, and destructive
- of the orginal content of the field.
-
- ScottB
-