home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / EDITORS / grinder / wheels / find2.hqx / find_replace.hqx / background_3858.xml < prev    next >
Encoding:
Extensible Markup Language  |  1995-03-28  |  2.5 KB  |  44 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>3858</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_3127.css" />
  10.     <part>
  11.         <id>6</id>
  12.         <type>button</type>
  13.         <visible> <true /> </visible>
  14.         <reserved5> 0 </reserved5>
  15.         <reserved4> 0 </reserved4>
  16.         <reserved3> 0 </reserved3>
  17.         <reserved2> 0 </reserved2>
  18.         <reserved1> 0 </reserved1>
  19.         <enabled> <true /> </enabled>
  20.         <rect>
  21.             <left>2</left>
  22.             <top>189</top>
  23.             <right>21</right>
  24.             <bottom>206</bottom>
  25.         </rect>
  26.         <style>opaque</style>
  27.         <showName> <false /> </showName>
  28.         <highlight> <false /> </highlight>
  29.         <autoHighlight> <true /> </autoHighlight>
  30.         <sharedHighlight> <true /> </sharedHighlight>
  31.         <family>0</family>
  32.         <titleWidth>0</titleWidth>
  33.         <icon>29540</icon>
  34.         <textAlign>center</textAlign>
  35.         <font>Chicago</font>
  36.         <textSize>12</textSize>
  37.         <textStyle>plain</textStyle>
  38.         <name>Help</name>
  39.         <script>on mouseUp
  40. fullhelp
  41. end mouseUp
  42.  
  43. on mouseenter
  44. helper "Click here for more help for HTML Grinder."
  45. end mouseenter</script>
  46.     </part>
  47.     <name></name>
  48.     <script>on enterkey
  49. set the hilite of cd btn "find & replace" to true
  50. wait 5
  51. set the hilite of cd btn "find & replace" to false
  52. send mouseup to cd btn "find & replace"
  53. end enterkey
  54.  
  55. on converter thefile,thecontents
  56. global totalchanges
  57. if totalchanges is empty then put "0" into totalchanges
  58. put thecontents into cd fld "holdText"
  59. -- put the hilite of cd btn "whole word" into wholer
  60. put cd fld findText into finder
  61. put cd fld changetext into changer
  62. put 0 into lastfind
  63. repeat forever
  64. if there is a window "grinding..." then
  65. if iconnum =1
  66. then put 3 into iconnum
  67. else put 1 into iconnum
  68. set i3_name of window "grinding..." to "grinder"&iconnum
  69. end if
  70. set cursor to busy
  71. -- if wholer
  72. -- then find whole finder in cd fld holdtext
  73. -- else
  74. find string finder in cd fld holdtext
  75. if the foundchunk is not empty then
  76. get word 2 of the foundchunk
  77. if it <= lastfind
  78. then exit repeat --we've gone all the way through and started over
  79. else put it into lastfind
  80. add 1 to totalchanges
  81. put changer into the foundchunk
  82. else exit repeat
  83. end repeat
  84. ReplaceFile thefile,cd fld holdText
  85. end converter
  86.  
  87. on alldone
  88. global totalchanges
  89. get totalchanges&&"occurrences were changed."
  90. put "0" into totalchanges
  91. send "alldone it" to homie()
  92. end alldone</script>
  93. </background>
  94.