home *** CD-ROM | disk | FTP | other *** search
- G4C
- ; $VER: func.mreplace Rev.021 by Juan Manuel Wehrli 1999 - 2000
- WINBIG -1 -1 600 405 "Multi Suchen & Ersetzen"
- WinType 11010000
- WinBackground IMAGE BG 0
- Winout "NIL:"
- VarPath HTMLEXT
-
- xOnLoad
- SetGad #This 4 OFF
- GuiOpen #This
-
- xOnOpen
- SetVar datpat "#?.htm"
- ifexists file "HTMLEXT:Settings/mrep.prefs"
- lvuse #This 1
- lvchange "htmlext:Settings/mrep.prefs"
- else
- lvuse #This 1
- lvchange "htmlext:Settings/defaults/MRep.prefs"
- lvsave "htmlext:Settings/mrep.prefs"
- endif
- if $*was != ""
- Update #This 3 $*was
- SetVar was $*was
- endif
-
- xOnQuit
- *string1 = $string1
- *string2 = $string2
- *was = $was
-
- XLISTVIEW 5 5 590 305 "" repdb "htmlext:Settings/mrep.prefs" 0 SHOW
- gadid 1
- gadfont sgiscreen.font 13 000
- EXTRACT %OLDSTRING CLEAN oldstring
- Update #This 5 $oldstring
- EXTRACT %NEWSTRING CLEAN newstring
- Update #This 6 $newstring
-
- xButton 5 310 35 18 "Neu"
- GadFont xHelvetica.font 11 000
- lvuse #This 1
- lvadd ''
- %OLDSTRING = "-Neuer Eintrag-"
- %NEWSTRING = "-Neuer Eintrag-"
- lvsort %OLDSTRING
- lvsave "htmlext:settings/mrep.prefs"
-
- xButton 40 310 50 18 "Ändern"
- GadFont xHelvetica.font 11 000
- lvuse #This 1
- lvdel -1
- lvadd ''
- %OLDSTRING = $altbeg
- %NEWSTRING = $neubeg
- lvsort %OLDSTRING
- lvsave "htmlext:settings/mrep.prefs"
- Update #This 5 ""
- Update #This 6 ""
-
- xButton 90 310 50 18 "Löschen"
- GadFont xHelvetica.font 11 000
- GadKey "a"
- lvuse #This 1
- lvdel -1
- lvsort %OLDSTRING
- lvsave "htmlext:settings/mrep.prefs"
-
- xButton 140 310 95 18 "Alles löschen"
- GadFont xHelvetica.font 11 000
- GadKey "a"
- lvuse #This 1
- lvclear
- lvchange "htmlext:settings/defaults/MRep.prefs"
- lvadd ''
- %OLDSTRING = "[Neuer Eintrag]"
- %NEWSTRING = "[Neuer Eintrag]"
- lvsort %OLDSTRING
- lvsave "htmlext:settings/mrep.prefs"
-
- TEXT 295 310 45 18 "Schema:" 20 NOBOX
- GadFont xHelvetica.font 11 000
-
- xButton 340 310 85 18 "Laden"
- GadFont xHelvetica.font 11 000
- reqFile -1 -1 300 600 "Schema laden ..." LOAD lschema "HTMLEXT:data/mrep/"
- ifexists file $lschema
- lvuse #This 1
- lvchange $lschema
- lvsave "htmlext:Settings/mrep.prefs"
- endif
-
- xButton 425 310 85 18 "Speichern als"
- GadFont xHelvetica.font 11 000
- reqFile -1 -1 300 600 "Schema speichern unter ..." SAVE sschema "HTMLEXT:data/mrep/"
- lvuse #This 1
- lvsave $sschema
-
- xButton 510 310 85 18 "Löschen"
- GadFont xHelvetica.font 11 000
- reqFile -1 -1 300 600 "Schema speichern unter ..." LOAD dschema "HTMLEXT:data/mrep/"
- ifexists file $dschema
- delete $dschema
- else
- EZREQ "Schema konnte nicht gelöscht werden!" "Weiter" NIL
- endif
-
-
- TEXT 8 330 45 15 "Suche nach:" 20 NOBOX
- GadFont xHelvetica.font 11 000
-
- xTextIn 5 345 220 18 "" altbeg "" 155
- GadID 5
- GadFont "xHelvetica.font" "11" 000
-
-
- TEXT 238 330 45 15 "Ersetze durch:" 20 NOBOX
- GadFont xHelvetica.font 11 000
-
- xTextIn 235 345 210 18 "" neubeg "" 155
- GadID 6
- GadFont "xHelvetica.font" "11" 000
- lvuse #This 1
- lvdel -1
- lvadd ''
- %OLDSTRING = $altbeg
- %NEWSTRING = $neubeg
- lvsort %OLDSTRING
- lvsave "htmlext:settings/mrep.prefs"
- Update #This 5 ""
- Update #This 6 ""
-
-
- TEXT 8 365 220 15 "Datei Pattern: (gilt nur für Funktion 2)" 100 NOBOX
- GadFont xHelvetica.font 11 000
-
- xTextIn 5 380 220 18 "" datpat "#?.htm" 155
- GadFont "xHelvetica.font" "11" 000
-
- xCheckBox 575 345 18 18 "bak Dateien erzeugen" *bakfilestat "1" "0" OFF
- GadID 4
- GadHelp "Diese Funktion ist noch nicht implementiert!"
- GadFont "xHelvetica.font" "11" 000
-
- xButton 290 380 110 18 "_1 Selekt. ersetzen"
- GadFont xHelvetica.font 11 000
- GadKey "1"
- Update "infobar" 1 "MultiReplace: Erstelle Dateiliste ..."
- GuiWindow HTMLEXT WAIT
- GuiWindow #This WAIT
- cli 'delete t:htmlext/mrep.files'
- cli 'delete t:htmlext/mrep.list'
- LVUSE HTMLEXT 3
- LVMulti First
- while $$lv.line > ''
- Joinfile $$lv.dir $$lv.rec aktfile
- cli 'echo "$aktfile" >>t:htmlext/mrep.files'
- LVUse HTMLEXT 3
- LVMulti Off
- LVMulti First
- endwhile
- Update "infobar" 1 "MultiReplace: Erstelle Replace Attributliste ..."
- LVUSE #This 1
- LVGO First
- while $$lv.line > ''
- Joinfile $$lv.dir $$lv.rec aktfile
- cli 'echo "$%OLDSTRING @@ $%NEWSTRING" >>t:htmlext/mrep.list'
- LVGO Next
- endwhile
- Update "infobar" 1 "MultiReplace: Ersetze ... bitte haben Sie Geduld ..."
- lvuse HTMLEXT 3
- LVMulti Show
- GuiWindow HTMLEXT RESUME
- GuiWindow #This RESUME
- RUN 'rx htmlext:mod/htmlext.smod MREP'
- GuiQuit #This
-
- xButton 400 380 110 18 "_2 Alles inkl. U.Verz."
- GadFont xHelvetica.font 11 000
- GadKey "2"
- Update "infobar" 1 "MultiReplace: Erstelle Dateiliste ..."
- GuiWindow HTMLEXT WAIT
- GuiWindow #This WAIT
- cli 'delete t:htmlext/mrep.files'
- cli 'delete t:htmlext/mrep.list'
- LVUSE HTMLEXT 3
- aktdir = $$lv.dir
- cli 'list DIR $aktdir P="$datpat" lformat="%P%N" FILES ALL >>t:htmlext/mrep.files'
- Update "infobar" 1 "MultiReplace: Erstelle Replace Attributliste ..."
- LVUSE #This 1
- LVGO First
- while $$lv.line > ''
- Joinfile $$lv.dir $$lv.rec aktfile
- cli 'echo "$%OLDSTRING @@ $%NEWSTRING" >>t:htmlext/mrep.list'
- LVGO Next
- endwhile
- Update "infobar" 1 "MultiReplace: Ersetze ... bitte haben Sie Geduld ..."
- lvuse HTMLEXT 3
- LVMulti None
- LVMulti Show
- GuiWindow HTMLEXT RESUME
- GuiWindow #This RESUME
- RUN 'rx htmlext:mod/htmlext.smod MREP'
- GuiQuit #This
-
- xButton 510 380 85 18 "[_X] Abbrechen"
- GadFont xHelvetica.font 11 000
- GadKey "x"
- GuiQuit #This
-
-