home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 14 / MA_Cover_14.iso / internet / htmlext / gui / func.mreplace < prev    next >
Encoding:
Text File  |  2000-02-03  |  5.5 KB  |  201 lines

  1. G4C
  2. ; $VER: func.mreplace Rev.019 by Juan Manuel Wehrli 1999 - 2000
  3. WINBIG -1 -1 600 405 "Multi Finden & Ersetzen"
  4. WinType 11010000
  5. WinBackground IMAGE BG 0
  6. Winout "NIL:"
  7. VarPath HTMLEXT
  8.  
  9. xOnLoad
  10.     SetGad #This 4 OFF
  11.     GuiOpen #This
  12.  
  13. xOnOpen
  14.     ifexists file "HTMLEXT:Settings/mrep.prefs"
  15.         lvuse #This 1
  16.         lvchange "htmlext:Settings/mrep.prefs"
  17.     else
  18.         lvuse #This 1
  19.         lvchange "htmlext:Settings/_defs/MRep.prefs"
  20.         lvsave "htmlext:Settings/mrep.prefs"
  21.     endif
  22.     if $*was != ""
  23.         Update #This 3 $*was
  24.         SetVar was $*was
  25.     endif
  26.  
  27. xOnQuit
  28.     *string1 = $string1
  29.     *string2 = $string2
  30.     *was = $was
  31.  
  32. XLISTVIEW 5 5 590 305 "" repdb "htmlext:Settings/mrep.prefs" 0 SHOW
  33.     gadid 1
  34.     gadfont sgiscreen.font 13 000
  35.     EXTRACT %OLDSTRING CLEAN oldstring
  36.     Update #This 5 $oldstring
  37.     EXTRACT %NEWSTRING CLEAN newstring
  38.     Update #This 6 $newstring
  39.  
  40. xButton 5 310 35 18 "Neu"
  41.     GadFont xHelvetica.font 11 000
  42.     lvuse #This 1
  43.     lvadd ''
  44.     %OLDSTRING = "-Neuer Eintrag-"
  45.     %NEWSTRING = "-Neuer Eintrag-"
  46.     lvsort %OLDSTRING
  47.     lvsave "htmlext:settings/mrep.prefs"
  48.  
  49. xButton 40 310 50 18 "Ändern"
  50.     GadFont xHelvetica.font 11 000
  51.     lvuse #This 1
  52.     lvdel -1
  53.     lvadd ''
  54.     %OLDSTRING = $altbeg
  55.     %NEWSTRING = $neubeg
  56.     lvsort %OLDSTRING
  57.     lvsave "htmlext:settings/mrep.prefs"
  58.     Update #This 5 ""
  59.     Update #This 6 ""
  60.  
  61. xButton 90 310 50 18 "Löschen"
  62.     GadFont xHelvetica.font 11 000
  63.     GadKey "a"
  64.     lvuse #This 1
  65.     lvdel -1
  66.     lvsort %OLDSTRING
  67.     lvsave "htmlext:settings/mrep.prefs"
  68.  
  69. xButton 140 310 95 18 "Alles löschen"
  70.     GadFont xHelvetica.font 11 000
  71.     GadKey "a"
  72.     lvuse #This 1
  73.     lvclear
  74.     lvchange "htmlext:settings/_defs/MRep.prefs"
  75.     lvadd ''
  76.     %OLDSTRING = "[Neuer Eintrag]"
  77.     %NEWSTRING = "[Neuer Eintrag]"
  78.     lvsort %OLDSTRING
  79.     lvsave "htmlext:settings/mrep.prefs"
  80.  
  81. CTEXT 295 310 "Schema:" xHelvetica.font 11 2 0 00000
  82.  
  83. xButton 340 310 85 18 "Laden"
  84.     GadFont xHelvetica.font 11 000
  85.     reqFile -1 -1 300 600 "Schema laden ..." LOAD lschema "HTMLEXT:Settings/mrep/"
  86.     ifexists file $lschema
  87.         lvuse #This 1
  88.         lvchange $lschema
  89.         lvsave "htmlext:Settings/mrep.prefs"
  90.     endif
  91.  
  92. xButton 425 310 85 18 "Speichern als"
  93.     GadFont xHelvetica.font 11 000
  94.     reqFile -1 -1 300 600 "Schema speichern unter ..." SAVE sschema "HTMLEXT:Settings/mrep/"
  95.     lvuse #This 1
  96.     lvsave $sschema
  97.  
  98. xButton 510 310 85 18 "Löschen"
  99.     GadFont xHelvetica.font 11 000
  100.     reqFile -1 -1 300 600 "Schema speichern unter ..." LOAD dschema "HTMLEXT:Settings/mrep/"
  101.     ifexists file $dschema
  102.         delete $dschema
  103.     else
  104.         EZREQ "Schema konnte nicht gelöscht werden!" "Weiter" NIL
  105.     endif
  106.  
  107. CTEXT 5 334 "Suchen nach:" xHelvetica.font 11 2 0 00000
  108.  
  109. xTextIn 5 350 220 18 "" altbeg "" 155
  110.     GadID 5
  111.     GadFont "xHelvetica.font" "11" 000
  112.  
  113. CTEXT 235 334 "Ersetzen durch:" xHelvetica.font 11 2 0 00000
  114.  
  115. xTextIn 235 350 210 18 "" neubeg "" 155
  116.     GadID 6
  117.     GadFont "xHelvetica.font" "11" 000
  118.     lvuse #This 1
  119.     lvdel -1
  120.     lvadd ''
  121.     %OLDSTRING = $altbeg
  122.     %NEWSTRING = $neubeg
  123.     lvsort %OLDSTRING
  124.     lvsave "htmlext:settings/mrep.prefs"
  125.     Update #This 5 ""
  126.     Update #This 6 ""
  127.  
  128. xCheckBox 575 350 18 18 "Backup Daten" *bakfilestat "1" "0" OFF
  129.     GadID 4
  130.     GadHelp "Diese Funktion ist noch nicht implementiert!"
  131.     GadFont "xHelvetica.font" "11" 000
  132.  
  133. xButton 290 380 110 18 "_1 Selekt. ersetzen"
  134.     GadFont xHelvetica.font 11 000
  135.     GadKey "1"
  136.     Update "infobar" 1 "MultiReplace: Erstelle Dateiliste ..."
  137.     GuiWindow HTMLEXT WAIT
  138.     GuiWindow #This WAIT
  139.     cli 'delete t:htmlext/mrep.files'
  140.     cli 'delete t:htmlext/mrep.list'
  141.     LVUSE HTMLEXT 3
  142.     LVMulti First
  143.     while $$lv.line > ''
  144.         Joinfile $$lv.dir $$lv.rec aktfile
  145.         cli 'echo "$aktfile" >>t:htmlext/mrep.files'
  146.         LVUse HTMLEXT 3
  147.         LVMulti Off
  148.         LVMulti First
  149.     endwhile
  150.     Update "infobar" 1 "MultiReplace: Erstelle Replace Attributliste ..."
  151.     LVUSE #This 1
  152.     LVGO First
  153.     while $$lv.line > ''
  154.         Joinfile $$lv.dir $$lv.rec aktfile
  155.         cli 'echo "$%OLDSTRING @@ $%NEWSTRING" >>t:htmlext/mrep.list'
  156.         LVGO Next
  157.     endwhile
  158.     Update "infobar" 1 "MultiReplace: Ersetze ... bitte haben Sie Geduld ..."
  159.     cli 'rx htmlext:mod/htmlext.smod MREP'
  160.     lvuse HTMLEXT 3
  161.     LVMulti Show
  162.     GuiWindow HTMLEXT RESUME
  163.     GuiWindow #This RESUME
  164.     Update "infobar" 1 "MultiReplace: Erfolgreich abgeschlossen!"
  165.     GuiQuit #This
  166.  
  167. xButton 400 380 110 18 "_2 Alles inkl. U.Verz."
  168.     GadFont xHelvetica.font 11 000
  169.     GadKey "2"
  170.     Update "infobar" 1 "MultiReplace: Erstelle Dateiliste ..."
  171.     GuiWindow HTMLEXT WAIT
  172.     GuiWindow #This WAIT
  173.     cli 'delete t:htmlext/mrep.files'
  174.     cli 'delete t:htmlext/mrep.list'
  175.     LVUSE HTMLEXT 3
  176.     aktdir = $$lv.dir
  177.     cli 'list $aktdir lformat="%P%N" FILES ALL >>t:htmlext/mrep.files'
  178.     Update "infobar" 1 "MultiReplace: Erstelle Replace Attributliste ..."
  179.     LVUSE #This 1
  180.     LVGO First
  181.     while $$lv.line > ''
  182.         Joinfile $$lv.dir $$lv.rec aktfile
  183.         cli 'echo "$%OLDSTRING @@ $%NEWSTRING" >>t:htmlext/mrep.list'
  184.         LVGO Next
  185.     endwhile
  186.     Update "infobar" 1 "MultiReplace: Ersetze ... bitte haben Sie Geduld ..."
  187.     cli 'rx htmlext:mod/htmlext.smod MREP'
  188.     lvuse HTMLEXT 3
  189.     LVMulti None
  190.     LVMulti Show
  191.     GuiWindow HTMLEXT RESUME
  192.     GuiWindow #This RESUME
  193.     Update "infobar" 1 "MultiReplace: Erfolgreich abgeschlossen!"
  194.     GuiQuit #This
  195.  
  196. xButton 510 380 85 18 "[_X] Abbrechen"
  197.     GadFont xHelvetica.font 11 000
  198.     GadKey "x"
  199.     GuiQuit #This
  200.  
  201.