home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / hypercar / 3280 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.1 KB

  1. From: bayes@hplvec.LVLD.HP.COM (Scott Bayes)
  2. Date: Tue, 25 Aug 1992 22:08:50 GMT
  3. Subject: Re: First 80 chars?
  4. Message-ID: <1170022@hplvec.LVLD.HP.COM>
  5. Organization: Hewlett-Packard Co., Loveland, CO
  6. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!hpscdc!hplextra!hpfcso!hplvec!bayes
  7. Newsgroups: comp.sys.mac.hypercard
  8. References: <1992Aug24.152115.20557@ncar.ucar.edu>
  9. Lines: 27
  10.  
  11. > on handler
  12. >   repeat forever
  13. >     if cd fld "xyz" is empty then exit repeat
  14. >     put char 1 to 80 of cd fld "xyz" & return after <container>
  15. >     delete char 1 to 80 of cd fld "xyz"
  16. >   end repeat
  17. > end handler
  18.  
  19. Neither have I tried it, but I think you first (before the repeat) want
  20. to copy the field to a container (get cd fld "xyz"), then use the
  21. container in the manipulation:
  22.  
  23. on handler
  24.   get cd fld "xyz"
  25.   repeat forever
  26.     if it is empty then exit repeat
  27.     put char 1 to 80 of it & return after <container>
  28.     delete char 1 to 80 of it
  29.   end repeat
  30. end handler
  31.  
  32. The reason being that operations that change fields always seem to hit
  33. the disk, causing your script to probably be very slow, and destructive
  34. of the orginal content of the field.
  35.  
  36. ScottB
  37.