home *** CD-ROM | disk | FTP | other *** search
- -- background: 3858 from stack: in.hqx
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 0
- -- name:
- ----- HyperTalk 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
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 2001
- -- rect: left=2 top=189 right=206 bottom=21
- -- title width / last selected line: 0
- -- icon id / first selected line: 29540 / 29540
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Help
- ----- HyperTalk script -----
- on mouseUp
- fullhelp
- end mouseUp
-
- on mouseenter
- helper "Click here for more help for HTML Grinder."
- end mouseenter
-