home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
- <background>
- <id>3858</id>
- <filler1>0</filler1>
- <cantDelete> <false /> </cantDelete>
- <showPict> <true /> </showPict>
- <dontSearch> <false /> </dontSearch>
- <link rel="stylesheet" type="text/css" href="stylesheet_3127.css" />
- <part>
- <id>6</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>2</left>
- <top>189</top>
- <right>21</right>
- <bottom>206</bottom>
- </rect>
- <style>opaque</style>
- <showName> <false /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <true /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>29540</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Help</name>
- <script>on mouseUp
- fullhelp
- end mouseUp
-
- on mouseenter
- helper "Click here for more help for HTML Grinder."
- end mouseenter</script>
- </part>
- <name></name>
- <script>on enterkey
- set the hilite of cd btn "find & replace" to true
- wait 5
- set the hilite of cd btn "find & replace" to false
- send mouseup to cd btn "find & replace"
- end enterkey
-
- on converter thefile,thecontents
- global totalchanges
- if totalchanges is empty then put "0" into totalchanges
- put thecontents into cd fld "holdText"
- -- put the hilite of cd btn "whole word" into wholer
- put cd fld findText into finder
- put cd fld changetext into changer
- put 0 into lastfind
- repeat forever
- if there is a window "grinding..." then
- if iconnum =1
- then put 3 into iconnum
- else put 1 into iconnum
- set i3_name of window "grinding..." to "grinder"&iconnum
- end if
- set cursor to busy
- -- if wholer
- -- then find whole finder in cd fld holdtext
- -- else
- find string finder in cd fld holdtext
- if the foundchunk is not empty then
- get word 2 of the foundchunk
- if it <= lastfind
- then exit repeat --we've gone all the way through and started over
- else put it into lastfind
- add 1 to totalchanges
- put changer into the foundchunk
- else exit repeat
- end repeat
- ReplaceFile thefile,cd fld holdText
- end converter
-
- on alldone
- global totalchanges
- get totalchanges&&"occurrences were changed."
- put "0" into totalchanges
- send "alldone it" to homie()
- end alldone</script>
- </background>
-