home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Text / HTML / HTMLEXT / GUI / HTMLLIB < prev    next >
Encoding:
Text File  |  2000-04-19  |  10.3 KB  |  382 lines

  1. G4C
  2. ; $VER: HTMLLIB Rev.032 by Juan Manuel Wehrli 1999 - 2000
  3. WinBig -1 -1 640 445 "HTMLEXT: Bibliothek"
  4. WinType 11110000
  5. WinBackground IMAGE BG 0
  6. Winout "NIL:"
  7.  
  8. xOnLoad
  9.     CLI 'LIST HTMLEXT:data/htmllib/ LFORMAT="%N" >t:htmlext/lib.list'
  10.     LVUSE #This 1
  11.     LVChange "t:htmlext/lib.list"
  12.     LVSort ASC
  13.     LVDel -1
  14.     LVUse #This 3
  15.     LVClear
  16.     GuiOpen #This
  17.  
  18. xOnClose
  19.     GuiQuit #This
  20.  
  21. xMenu "Projekt" "Importieren" "" ""
  22.     CLI 'lha -T x ram:HTMLEXT_lib.lha HTMLEXT: >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  23.  
  24. xMenu "Projekt" "Exportieren" "" ""
  25.     CLI 'lha -A -r u ram:HTMLEXT_lib.lha HTMLEXT:data/htmllib >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  26.  
  27. xMenu "Projekt" "Synchronisieren" "" ""
  28.     ifexists FILE "ram:HTMLEXT_lib.lha"
  29.         CLI 'lha -T x ram:HTMLEXT_lib.lha HTMLEXT: >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  30.         CLI 'lha -r u ram:HTMLEXT_lib.lha HTMLEXT:data/htmllib >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  31.         EZReq "Soll das Update nun verschickt werden?" "Ja|Nein" ezupd
  32.         if $ezupd = 1
  33.             lvuse HTMLEXT 1
  34.             if $%SiteMail  = ""
  35.                 SetVar mailadr "Keine Angabe"
  36.             else
  37.                 EXTRACT %SiteMail CLEAN mailadr
  38.             endif
  39.             SetVar .HTMLEXT.emad $mailadr
  40.             SetVar .HTMLEXT.subj "HTMLEXT Library Update"
  41.             CLI 'setenv .HTMLEXT.user $*USER'
  42.             CLI 'rx $*MAILER LIBUPDATE "ram:HTMLEXT_lib.lha"'
  43.         endif
  44.     else
  45.         CLI 'lha -r a ram:HTMLEXT_lib.lha HTMLEXT:data/htmllib >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  46.         EZReq "Soll das Update nun verschickt werden?" "Ja|Nein" ezupd
  47.         if $ezupd = 1
  48.             lvuse HTMLEXT 1
  49.             if $%SiteMail  = ""
  50.                 SetVar mailadr "Keine Angaben"
  51.             else
  52.                 EXTRACT %SiteMail CLEAN mailadr
  53.             endif
  54.             SetVar .HTMLEXT.emad $mailadr
  55.             SetVar .HTMLEXT.subj "HTMLEXT Library Update"
  56.             CLI 'setenv .HTMLEXT.user $*USER'
  57.             CLI 'rx $*MAILER LIBUPDATE "ram:HTMLEXT_lib.lha"'
  58.         endif
  59.     endif
  60.  
  61. xMenu "Projekt" "Beenden" "" ""
  62.     GuiQuit #This
  63.  
  64. xMenu "Kategorie" "Import" "" ""
  65.     Reqfile -1 -1 200 500 "Bitte Import Verzeichnis auswählen" DIR "impdir" "ram:"
  66.     Reqfile -1 -1 200 500 "Bitte Destination auswählen" DIR "destdir" "HTMLEXT:data/htmllib/"
  67.     FailAt 21
  68.     CLI 'copy $impdir to $destdir ALL >CON:0/0/550/50/Kopiere/CLOSE/PUBSCREEN$*SCREEN'
  69.  
  70. xMenu "Kategorie" "Import LhA" "" ""
  71.     Reqfile -1 -1 200 500 "Bitte Import Datei wählen" FILE "impfile" "ram:"
  72.     CLI 'lha x $impfile HTMLEXT: >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  73.  
  74. xMenu "Kategorie" "Export" "" ""
  75.     SetVar VORS "HTMLEXT:data/htmllib/"
  76.     AppVar VORS "$LVP"
  77.     Reqfile -1 -1 200 500 "Bitte Destination auswählen" DIR "dest" "ram:"
  78.     SetVar destdir $dest
  79.     AppVar destdir $LVP
  80.     CLI 'makedir $destdir'
  81.     FailAt 21
  82.     CLI 'copy $VORS TO $destdir >CON:0/0/550/50/Kopiere/CLOSE/PUBSCREEN$*SCREEN'
  83.  
  84. xMenu "Kategorie" "Export LhA" "" ""
  85.     SetVar dir "HTMLEXT:data/htmllib/"
  86.     AppVar dir $LVP
  87.     SetVar name "ram:"
  88.     AppVar name $LVP
  89.     AppVar name "_lib.lha"
  90.     CLI 'Lha -r a $name $dir >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  91.  
  92. ;Projekte Teil
  93. xLISTVIEW 450 25 185 180 "" "LVP" "t:htmlext/lib.list" 0 "SHOW"
  94.     GadID 1
  95.     GadFont xHelvetica.font 11 000
  96.     CLI 'LIST HTMLEXT:data/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  97.     LVUSE #This 3
  98.     LVChange "t:htmlext/lib.tags"
  99.     LVSort ASC
  100.     LVDel -1
  101.  
  102. xButton 450 5 15 18 "+"
  103.     GadFont xHelvetica.font 11 000
  104.     GadHelp "Neue Kategorie hinzufügen ..."
  105.     SetVar .htmlext.rqt "Neue Kategorie"  ;Titel
  106.     SetVar .htmlext.rqb "Bitte Kategorienamen eingeben:"  ;Body
  107.     SetVar .htmlext.rqd "Neu"  ;Default
  108.     SetVar .htmlext.rqu "Weiter|Abbrechen"  ;Buttons
  109.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  110.     if $.htmlext.res = 1
  111.         LVUSE #This 1
  112.         string = $.htmlext.tmp
  113.         LVADD $.htmlext.tmp
  114.         LVSort ASC
  115.         Update #This 4 ""
  116.         SetVar TMP "HTMLEXT:data/htmllib/"
  117.         AppVar TMP "$string"
  118.         CLI 'makedir $TMP'
  119.         SetGad  #This 4 HIDE
  120.     endif
  121.  
  122. xButton 465 5 15 18 "-"
  123.     GadFont xHelvetica.font 11 000
  124.     GadHelp "Kategorie löschen ..."
  125.     EZREQ "Achtung: Es werden alle Daten der aktuellen Kategorie gelöscht!" "Weiter|Abbrechen" EZVAR
  126.     if $EZVAR = "1"
  127.         SetVar TMP "HTMLEXT:data/htmllib/"
  128.         AppVar TMP "$LVP"
  129.         FailAt 21
  130.         CLI 'delete $TMP ALL NOREQ'
  131.         LVUSE #This 1
  132.         LVDEL -1
  133.     endif
  134.  
  135. xButton 480 5 15 18 "R"
  136.     GadFont xHelvetica.font 11 000
  137.     GadHelp "Kategorie umbennen ..."
  138.     lvuse #This 1
  139.     SetVar .htmlext.rqt "Kategorie umbennen"  ;Titel
  140.     SetVar .htmlext.rqb "Bitte geben Sie der Kategorie den gewünschten Namen"  ;Body
  141.     SetVar .htmlext.rqd "$$lv.rec"  ;Default
  142.     SetVar .htmlext.rqu "Weiter|Abbrechen"  ;Buttons
  143.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  144.     if $.htmlext.res = 1
  145.         SetVar oname "htmlext:data/htmllib/"
  146.         AppVar oname $$lv.rec
  147.         SetVar nname "htmlext:data/htmllib/"
  148.         AppVar nname $.htmlext.tmp
  149.         cli 'rename $oname $nname'
  150.         CLI 'LIST HTMLEXT:data/htmllib/ LFORMAT="%N" >t:htmlext/lib.list'
  151.         LVChange "t:htmlext/lib.list"
  152.         LVSort ASC
  153.         LVDel -1
  154.     endif
  155.  
  156. ; TAG Teil
  157. xLISTVIEW 450 235 185 180 "" "LVT" "t:htmlext/lib.list" 0 "SHOW"
  158.     GadID 3
  159.     GadFont xHelvetica.font 11 000
  160.     UPDATE #This 4 $LVT
  161.     STRT = $LVT
  162.     SetVar ALVDATA "HTMLEXT:data/htmllib/$LVP"
  163.     AppVar ALVDATA "/$LVT"
  164.     LVUSE #This 5
  165.     LVChange "$ALVDATA"
  166.     if $aprev = "1"
  167.         SetVar VORS "HTMLEXT:data/htmllib/"
  168.         AppVar VORS "$LVP"
  169.         AppVar VORS "/"
  170.         AppVar VORS "$LVT"
  171.         IfExists FILE $VORS
  172.             FailAt 21
  173.             CLI 'rx $*BROWSER OPEN $VORS'
  174.         endif
  175.     endif
  176.  
  177. xButton 450 215 15 18 "+"
  178.     GadFont xHelvetica.font 11 000
  179.     GadHelp "Neuer TAG Eintrag erzeugen ..."
  180.     SetVar .htmlext.rqt "Neuer Tag Eintrag"  ;Titel
  181.     SetVar .htmlext.rqb "Bitte Namen des neu zu erzeugenden Tag-Eintrages eingeben:"  ;Body
  182.     SetVar .htmlext.rqd "Neu"  ;Default
  183.     SetVar .htmlext.rqu "Weiter|Abbrechen"  ;Buttons
  184.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  185.     if $.htmlext.res = 1
  186.         SetVar TMP "HTMLEXT:data/htmllib/"
  187.         AppVar TMP "$LVP"
  188.         AppVar TMP "/"
  189.         AppVar TMP $.htmlext.tmp
  190.         FailAt 21
  191.         CLI 'copy HTMLEXT:settings/defaults/Libtag.txt to $TMP'
  192.         SetVar Befehl "rx "
  193.         AppVar Befehl $*EDITOR
  194.         AppVar Befehl " OPENNEW "
  195.         AppVar Befehl $TMP
  196.         CLI '$Befehl'
  197.         CLI 'LIST HTMLEXT:data/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  198.         LVUSE #This 3
  199.         LVChange "t:htmlext/lib.tags"
  200.         LVSort ASC
  201.         LVDel -1
  202.     endif
  203.  
  204. xButton 465 215 15 18 "-"
  205.     GadFont xHelvetica.font 11 000
  206.     GadHelp "Aktiver TAG Eintrag löschen ... Achtung: Keine Abfrage!"
  207.     LVUSE #This 3
  208.     SetVar TMP "HTMLEXT:data/htmllib/"
  209.     AppVar TMP $LVP
  210.     AppVar TMP "/"
  211.     AppVar TMP $LVT
  212.     FailAt 21
  213.     CLI 'delete $TMP FORCE'
  214.     lvdel -1
  215.  
  216. xButton 480 215 15 18 "R"
  217.     GadFont xHelvetica.font 11 000
  218.     GadHelp "TAG Eintrag umbennen ..."
  219.     lvuse #This 3
  220.     SetVar .htmlext.rqt "TAG Eintrag umbennen"  ;Titel
  221.     SetVar .htmlext.rqb "Bitte geben Sie dem TAG Eintrag den gewünschten Namen"  ;Body
  222.     SetVar .htmlext.rqd "$$lv.rec"  ;Default
  223.     SetVar .htmlext.rqu "Weiter|Abbrechen"  ;Buttons
  224.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  225.     if $.htmlext.res = 1
  226.         SetVar oname "htmlext:data/htmllib/"
  227.         lvuse #This 1
  228.         AppVar oname $$lv.rec
  229.         lvuse #This 3
  230.         AppVar oname "/"
  231.         AppVar oname $$lv.rec
  232.         SetVar nname "htmlext:data/htmllib/"
  233.         lvuse #This 1
  234.         AppVar nname $$lv.rec
  235.         lvuse #This 3
  236.         AppVar nname "/"
  237.         AppVar nname $.htmlext.tmp
  238.         cli 'rename $oname $nname'
  239.         CLI 'LIST HTMLEXT:data/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  240.         LVUSE #This 3
  241.         LVChange "t:htmlext/lib.tags"
  242.         LVSort ASC
  243.         LVDel -1
  244.     endif
  245.  
  246. xButton 495 215 55 18 "N.v.Mark"
  247.     GadFont xHelvetica.font 11 000
  248.     GadHelp "Erzeugt neuen Eintrag vom selektiertem Abschnitt im Editor"
  249.     SetVar .htmlext.rqt "Tag Name:"  ;Titel
  250.     SetVar .htmlext.rqb "Bitte geben Sie den gewünschen TAG Namen ein ..."  ;Body
  251.     SetVar .htmlext.rqd "Neu"  ;Default
  252.     SetVar .htmlext.rqu "Weiter|Abbrechen"  ;Buttons
  253.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  254.     if $.htmlext.res = 1
  255.         SetVar TMP "HTMLEXT:data/htmllib/"
  256.         AppVar TMP "$LVP"
  257.         AppVar TMP "/"
  258.         AppVar TMP "$.htmlext.tmp"
  259.         cli 'rx $*EDITOR BLOCKSAVE $TMP'
  260.         CLI 'LIST HTMLEXT:data/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  261.         LVUSE #This 3
  262.         LVChange "t:htmlext/lib.tags"
  263.         LVSort ASC
  264.         LVDel -1
  265.     endif
  266.  
  267. ; DATA Teil
  268. xLISTVIEW 5 25 440 390 "" "LIBD" "HTMLEXT:data/htmllib/hilfe/Einleitung" 10 "MULTI"
  269.     GadID 5
  270.     GadFont xCourier.font 11 000
  271.  
  272. xButton 5 5 70 18 "Alles"
  273.     GadFont xHelvetica.font 11 000
  274.     lvuse #This 5
  275.     LVMulti All
  276.  
  277. xButton 75 5 70 18 "Nichts"
  278.     GadFont xHelvetica.font 11 000
  279.     lvuse #This 5
  280.     LVMulti None
  281.  
  282. xButton 145 5 70 18 "Bearbeiten"
  283.     GadFont xHelvetica.font 11 000
  284.     SetVar BEARB "HTMLEXT:data/htmllib/"
  285.     AppVar BEARB "$LVP"
  286.     AppVar BEARB "/"
  287.     AppVar BEARB "$LVT"
  288.     IfExists FILE $BEARB
  289.         CLI '$*EDITOR OPENNEW "$BEARB"'
  290.     else
  291.         FailAt 21
  292.         COPY "HTMLEXT:settings/defaults/Libtag.txt" "$BEARB"
  293.         CLI '$*EDITOR OPENNEW "$BEARB"'
  294.     endif
  295.  
  296. xButton 355 5 70 18 "_Vorschau"
  297.     GadFont xHelvetica.font 11 000
  298.     GadKey "v"
  299.     SetVar VORS "HTMLEXT:data/htmllib/"
  300.     AppVar VORS "$LVP"
  301.     AppVar VORS "/"
  302.     AppVar VORS "$LVT"
  303.     IfExists FILE $VORS
  304.         FailAt 21
  305.         CLI 'rx $*BROWSER OPEN $VORS'
  306.     endif
  307.  
  308. xCheckBox 425 5 20 18 "" aprev "1" "2" OFF
  309.     GadHelp "Automaitsche Vorschau aktivieren."
  310.  
  311.  
  312.  
  313.  
  314. ;Untere Buttons
  315. xButton 5 420 100 18 "Datei erzeugen"
  316.     GadFont xHelvetica.font 11 000
  317.     GadHelp "Neue Datei erzeugen"
  318.     SetVar BEARB "HTMLEXT:data/htmllib/"
  319.     AppVar BEARB "$LVP"
  320.     AppVar BEARB "/"
  321.     AppVar BEARB "$LVT"
  322.     LVUSE HTMLEXT 3
  323.     SetVar nfile "$$LV.DIR"
  324.     AppVar nfile ".htm"
  325.     SetVar .htmlext.rqt "Datei erzeugen"  ;Titel
  326.     SetVar .htmlext.rqb "Bitte Dateinamen eingeben ..."  ;Body
  327.     SetVar .htmlext.rqd "$nfile"  ;Default
  328.     SetVar .htmlext.rqu "Erzeugen|Abbrechen"  ;Buttons
  329.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  330.     if $.htmlext.res = 1
  331.         IfExists FILE $BEARB
  332.             FailAt 21
  333.             CLI 'copy "$BEARB" to $.htmlext.tmp'
  334.             CLI 'rx $*BROWSER OPEN $.htmlext.tmp'
  335.         endif
  336.         LVUSE HTMLEXT 3
  337.         LVDIR #$$LV.DIR
  338.     endif
  339.  
  340. xButton 105 420 100 18 "_Einfügen"
  341.     GadFont xHelvetica.font 11 000
  342.     GadKey "e"
  343.     SetVar BEARB "HTMLEXT:data/htmllib/"
  344.     AppVar BEARB "$LVP"
  345.     AppVar BEARB "/"
  346.     AppVar BEARB "$LVT"
  347.     CLI '$*EDITOR INSERT "$BEARB"'
  348.  
  349. xButton 205 420 100 18 "Markiertes einf."
  350.     GadFont xHelvetica.font 11 000
  351.     CLI 'echo "" >t:htmlext/temp.txt'
  352.     LVUSE #This 5
  353.     LVMulti First
  354.     while $$lv.line > ""
  355.         cli 'echo "$$lv.rec" >>t:htmlext/temp.txt'
  356.         LVMulti OFF
  357.         LVMulti Show
  358.         LVMulti First
  359.     EndWhile
  360.     CLI '$*EDITOR INSERT "t:htmlext/temp.txt"'
  361.     cli 'delete t:htmlext/temp.txt'
  362.     Update "infobar" 1 "Fertig!"
  363.  
  364. xButton 305 420 100 18 "Tag einfügen"
  365.     GadFont xHelvetica.font 11 000
  366.     LVMulti First
  367.     while $$lv.line > ""
  368.         CLI '$*EDITOR PASTE $$lv.rec'
  369.         LVMulti OFF
  370.         LVMulti Show
  371.         LVMulti First
  372.     EndWhile
  373.  
  374.  
  375. ; Globaler Teil
  376. xButton 535 420 100 18 "[_X] Schliessen"
  377.     GadKey "x"
  378.     GadFont xHelvetica.font 11 010
  379.     GuiQuit #This
  380.  
  381.  
  382.