[script]
n0=;*/Ìåíåäæåð òîïèêîâ/*
n1=alias lookTopicModelator { if ($dialog(lookTopicModelator) == $null)  dialog -m lookTopicModelator lookTopicModelator | else dialog -v lookTopicModelator }
n2=
n3=dialog lookTopicModelator {
n4=  title "looksharp - Topic Modelator"
n5=  size -1 -1 610 210
n6=  ;  size -1 -1 610 240
n7=  icon 1, 5 211 113 22, System\Images\Copyright.jpg
n8=
n9=  tab "Modelator",2, 5 5 600 170
n10=  tab "About",3
n11=
n12=  text "Custom text : ",100,15 90 100 15, tab 2
n13=  edit "",101,15 110 580 22, tab 2 autohs
n14=  check " Apply Style :", 103, 15 140 80 15, tab 2
n15=  combo 104,100 135 300 150, drop tab 2
n16=  check " Strip Colors Codes", 105, 415 140 120 15, tab 2
n17=
n18=  check " Change on :", 200, 15 185 80 15
n19=  combo 201,100 180 100 150, drop 
n20=  text "as",202,205 185 15 15,
n21=  combo 203,225 180 100 150, drop 
n22=  check "ADD to DataBase", 204, 340 185 140 15
n23=
n24=  button "&Ok",300, 485 180 113 22, ok
n25=  button "&Cancel",301, 485 210 113 22, cancel
n26=  box "",1000,15 35 580 40, 
n27=  text "| | | | | | | | |  Preview display  | | | | | | | | |",1001,20 50 570 15,disable center
n28=
n29=  text "Topic Modelator",1500,15 95 260 15, tab 3
n30=  text "Copyright © 1999-2000 Àmäz|ñg-Xtrêmê",1501,15 110 260 15, tab 3
n31=  text "Coded by Amaz|ng^",1502,15 125 260 15, tab 3
n32=  link "http://www.looksharp.com.ar",1503,15 145 140 15, tab 3
n33=  link "http://www.looksharp.tsx.org",1504,170 145 140 15, tab 3
n34=  link "http://www.looksharp.cjb.net",1505,330 145 140 15, tab 3
n35=}
n36=
n37=on 1:DIALOG:lookTopicModelator:init:0: { lookTopicModelator.Extract }
n38=
n39=alias lookTopicModelator.Extract {
n40=  var %nCount = 0
n41=  while (%nCount < $lines($mircdir\DataBase\TopicStylesIDX.txt)) {
n42=    inc %nCount
n43=    did -a lookTopicModelator 104 $read -l $+ %nCount $mircdir\DataBase\TopicStylesIDX.txt
n44=  }
n45=  did -c lookTopicModelator 104 1
n46=
n47=  if ($chan(0) == 0) did -b lookTopicModelator 200,201
n48=  else {
n49=    var %nCount = 0
n50=    while (%nCount < $chan(0)) {
n51=      inc %nCount
n52=      did -a lookTopicModelator 201 $chan(%nCount)
n53=    }
n54=    did -c lookTopicModelator 200
n55=    did -c lookTopicModelator 201 1
n56=  }
n57=
n58=  did -ca lookTopicModelator 203 Tipical Topic
n59=  did -a lookTopicModelator 203 Onjoin Topic (IRCX)
n60=  did -a lookTopicModelator 203 Onpart Topic (IRCX)
n61=
n62=  if (%lTopicModelator.WDataBase) did -c lookTopicModelator 204
n63=  if (%cTopicModelator.TargetTopic == $null) {  did -c lookTopicModelator 103 }
n64=  else { did -ra lookTopicModelator 101 %cTopicModelator.TargetTopic }
n65=
n66=  lookTopicModelator.Control
n67=
n68=  lookTopicModelatorShow on
n69=  lookTopicModelatorShow refresh
n70=}
n71=
n72=alias lookTopicModelator.Control {
n73=  if ($did(lookTopicModelator,103).state) did -e lookTopicModelator 104,105 | else did -b lookTopicModelator 104,105 
n74=  if ($did(lookTopicModelator,200).state) did -e lookTopicModelator 201 | else did -b lookTopicModelator 201
n75=}
n76=
n77=on 1:DIALOG:lookTopicModelator:sclick:1: { .splay $mircdirSystem\Wavs\Message.wav }
n78=on 1:DIALOG:lookTopicModelator:edit:101: { lookTopicModelatorShow refresh }
n79=on 1:DIALOG:lookTopicModelator:sclick:103: { lookTopicModelator.Control | lookTopicModelatorShow refresh }
n80=on 1:DIALOG:lookTopicModelator:sclick:104: { lookTopicModelatorShow refresh }
n81=on 1:DIALOG:lookTopicModelator:sclick:105: { lookTopicModelatorShow refresh }
n82=on 1:DIALOG:lookTopicModelator:sclick:200: { lookTopicModelator.Control }
n83=
n84=on 1:DIALOG:lookTopicModelator:sclick:300: { 
n85=  lookTopicModelatorShow off
n86=
n87=  if ($did(lookTopicModelator,203).sel == 1) {
n88=    if ($did(lookTopicModelator,204).state) {
n89=      write $mircdir\DataBase\Topics.txt $lookTopicModelatorBuild
n90=      if ($window(@Topic) != $null) { aline @Topic $lookTopicModelatorBuild | sline @Topic $line(@Topic,0) }
n91=    }
n92=    if ($did(lookTopicModelator,200).state) topic $did(lookTopicModelator,201).text $lookTopicModelatorBuild
n93=  }
n94=
n95=  if ($did(lookTopicModelator,203).sel == 2) {
n96=    if ($did(lookTopicModelator,204).state) {
n97=      write $mircdir\DataBase\OnjoinTopics.txt $lookTopicModelatorBuild
n98=      if ($window(@Onjoin) != $null) { aline @Onjoin $lookTopicModelatorBuild | sline @Onjoin $line(@Onjoin,0) }
n99=    }
n100=    if (($did(lookTopicModelator,200).state) && (%lIRCX)) prop $did(lookTopicModelator,201).text onjoin : $+ $lookTopicModelatorBuild
n101=  }
n102=
n103=  if ($did(lookTopicModelator,203).sel == 3) {
n104=    if ($did(lookTopicModelator,204).state) {
n105=      write $mircdir\DataBase\OnpartTopics.txt $lookTopicModelatorBuild
n106=      if ($window(@Onpart) != $null) { aline @Onpart $lookTopicModelatorBuild | sline @Onpart $line(@Onpart,0) }
n107=    }
n108=    if (($did(lookTopicModelator,200).state) && (%lIRCX)) prop $did(lookTopicModelator,201).text onpart : $+ $lookTopicModelatorBuild
n109=  }
n110=
n111=}
n112=
n113=on 1:DIALOG:lookTopicModelator:sclick:301: { lookTopicModelatorShow off }
n114=
n115=alias lookTopicModelatorShow {
n116=  if ($1 == on) {
n117=    window -c @lookTopicModelatorShow01
n118=    window -hkdo +dL @lookTopicModelatorShow01 $calc($dialog(lookTopicModelator).x + 18) $calc($dialog(lookTopicModelator).y + 60) 580 36
n119=    window -a @lookTopicModelatorShow01
n120=    dialog -v lookTopicModelator
n121=    .timerlookTopicModelatorShow01position -mo 0 250 lookTopicModelatorShow refreshposition
n122=  }
n123=  if ($1 == refresh) {
n124=    clear @lookTopicModelatorShow01
n125=    echo @lookTopicModelatorShow01 $lookTopicModelatorBuild
n126=  }
n127=  if ($1 == refreshposition) {
n128=    window $iif($dialog(lookTopicModelator).active,-o,-u) @lookTopicModelatorShow01 $calc($dialog(lookTopicModelator).x + 18) $calc($dialog(lookTopicModelator).y + 60) 580 36
n129=  }
n130=  if ($1 == off) {
n131=    window -c @lookTopicModelatorShow01
n132=    .timerlookTopicModelatorShow01position off
n133=  }
n134=}
n135=
n136=alias lookTopicModelatorBuild {
n137=  if ($did(lookTopicModelator,103).state) {
n138=    var %cBuildTopic
n139=    var %cBuildTopic = $read -l $+ $did(lookTopicModelator,104).sel $mircdir\DataBase\TopicStyles.txt
n140=    var %cBuildTopic = $replace(%cBuildTopic,&looksharpCustomText,$did(lookTopicModelator,101).text)
n141=    if ($did(lookTopicModelator,105).state) var %cBuildTopic = $strip(%cBuildTopic)
n142=    return %cBuildTopic
n143=  }
n144=  else return $iif($did(lookTopicModelator,101).text != $null,$did(lookTopicModelator,101).text,$LookVer)
n145=}
