home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20756 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  1.9 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!agate!apple!mumbo.apple.com!gallant.apple.com!seuss.apple.com!user
  2. From: absurd@apple.apple.com (Tim Dierks, software saboteur)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: A short question on MPW scripting
  5. Message-ID: <absurd-050193161631@seuss.apple.com>
  6. Date: 6 Jan 93 00:19:24 GMT
  7. References: <kpw105-050193092430@theophys1.anu.edu.au>
  8. Sender: news@gallant.apple.com
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: MacDTS Marauders
  11. Lines: 38
  12.  
  13. In article <kpw105-050193092430@theophys1.anu.edu.au>,
  14. kpw105@huxley.anu.edu.au (Ken Wessen) wrote:
  15. > Hello.
  16. > I am new to MPW scripting, and am having a problem doing something that
  17. > seems like it should be quite easy.  What I require is to find a completely
  18. > blank line both above and below the current insertion point, and select
  19. > everything in between.
  20. > I tried using
  21. > find \o[La-zA-Z0-9d\%]\J:J/o[La-zA-Z0-9d\%]/
  22. > where o=option 8, L=option L, J=option-j and d=option d,
  23. > but this didnt work.  Furthermore, the blank line definition is not
  24. > satisfactory and I dont really want to extend it to include [not list of
  25. > all possible characters].  Using a wild card [option L option x] gave
  26. > results I didn't really understand, but I thought it should have just
  27. > matched a line with nothing but a return.  Any help would be greatly
  28. > appreciated.
  29.  
  30. Try using:
  31.  
  32. find \o5\!1:/o5/
  33.  
  34. Where o is option-8 and 5 is option-5.  If a blank line may have
  35. white space, use
  36.  
  37. find \o[ dt]*5\!1:j/o[ dt]*5/
  38.  
  39. Where o is option-8, 5 is option-5, j is option-j, and d is option-d.
  40.  
  41. > p.s. Is there a script or tool floating around somewhere that will word
  42. > wrap a selection of text?
  43.  
  44. I've got one called Indent, which I believe I got out of the MPW
  45. Goodies package, which I think comes with the developer CD or on
  46. E.T.O., and might be on the ftp site.
  47.  
  48. Tim Dierks
  49. MacDTS, but I speak for myself and my brain-damaged keyboard
  50.