home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / NFind / Add to UserStartup
Encoding:
Text File  |  1991-02-18  |  2.5 KB  |  52 lines  |  [TEXT/MPS ]

  1. # The tools included in this package (NewFindTool and NewREplaceTool)
  2. # are intended to replace the standard MPW Find and Replace menu commands.
  3. # They do this by maintaining (as standard, editable text files) previous
  4. # search and replace strings, and presenting these saved strings in scrollable
  5. # lists in the NewFind and NewReplace dialogs.  On my own system, I have
  6. # given the "new" commands the standard command key equivalent, and
  7. # used ResEdit to remove the command key assignments from the built-in
  8. # commands.
  9.  
  10. # The NewFind and NewReplace have all the functionality of the standard
  11. # MPW menu commands with one exception: they lack the wrap-around search
  12. # option.  The remaining search options are fully supported, and the scripts
  13. # are executed so that changes made to the search backward, ignore case, etc.
  14. # options are saved and used by the standard MPW menu commands.  Pressing the
  15. # shift key when selecting Find, Replace, etc. will temporarily reverse the
  16. # search direction, just like the standard menu command.  Command-. will
  17. # cancel the command and close the dialog box, Return or Enter will select
  18. # the default (highlighted) button. Text copied from the current window may
  19. # be pasted into the dialogs' text edit boxes, and text cut, copied, and pasted
  20. # between the text edit boxes.
  21.  
  22. # These tools consitute much enhanced versions of some pure script-based enhancers
  23. # that I previously uploaded (Extras.sit).  They are also a faster, bug-fixed version
  24. # of the previously uploaded NFind.sit.
  25.  
  26. # Note that the make files included with the source code use the -opt full compiler
  27. # option introduced with MPW 3.2.  Users of previous compiler versions will want to
  28. # omit this option.
  29.  
  30. # Brian Clark
  31. # CServe 71241,2407
  32.  
  33. # add NewFind and NewReplace
  34. Set FindStrings "{MPW}"FindStrings
  35. Set ReplaceStrings "{MPW}"ReplaceStrings
  36. Set LastFindString "{MPW}"LastFindString
  37. Set LastReplaceString "{MPW}"LastReplaceString
  38. Set FindAgainScript  "{MPW}"FindAgainScript
  39. Set ReplaceAgainScript  "{MPW}"ReplaceAgainScript
  40. Export FindStrings
  41. Export ReplaceStrings
  42. Export LastFindString
  43. Export LastReplaceString
  44. Export FindAgainScript
  45. Export ReplaceAgainScript
  46. AddMenu Find '(-' ''
  47. AddMenu Find 'Find <I/F'            'Begin; NewFindTool; Execute "{FindAgainScript}"; End'
  48. AddMenu Find 'Find Same <I/G'        'Execute "{FindAgainScript}"'
  49. AddMenu Find 'Replace <I/R'            'Begin; NewReplaceTool; Execute "{ReplaceAgainScript}"; End'
  50. AddMenu Find 'Replace Same <I/T'    'Execute "{ReplaceAgainScript}"'
  51.     
  52. # end of Add to UserStartup