[script]
n0=dialog quote {
n1=  size -1 -1 200 155
n2=  option dbu
n3=  title "Mémodélire"
n4=  tab "Mémodélires",500,3 5 194 135
n5=  tab "Ajouter/Supprimer",501
n6=  button "fermer",1,3 143 40 10,ok
n7=  list 3,10 22 180 100,tab 500,
n8=  button "Dire la sélection sur :",4,25 123 60 12,tab 500
n9=  combo 5,95 123 80 50,tab 500,drop
n10=  list 6,10 22 180 90,tab 501,
n11=  edit "",7,10 110 180 13,tab 501,autohs
n12=  button "Ajouter",8,30 125 60 10,tab 501
n13=  button "Supprimer",9,110 125 60 10,tab 501
n14=}
n15=alias quotec { dialog -dm quote quote }
n16=on *:dialog:quote:init:0:{
n17=  var %i = 1
n18=  var %l = $lines(txt\quotes.txt)
n19=  while %i <= %l {
n20=    var %ligne = $read -l $+ %i txt\quotes.txt
n21=    did -a $dname 3,6 %ligne
n22=    inc %i 1
n23=  }
n24=  var %j = 1
n25=  did -a $dname 5 Active
n26=  while $chan(%j) != $null  {
n27=    did -a $dname 5 $chan(%j) 
n28=    if  $chan(%j) == $active { set -u %c %j }
n29=    inc %j 1
n30=  }
n31=  var %j = 1
n32=  while $query(%j) != $null  {
n33=    did -a $dname 5 $query(%j) 
n34=    if  $query(%j) == $active { set -u %c %j }
n35=    inc %j 1
n36=  }
n37=  if %c != $null { did -c $dname 5 $calc( %c + 1) }
n38=  else { did -c $dname 5 1 }
n39=  elseif $readini system.ini quotes mode == perso2 { did -c $dname 13 | did -a $dname 14 %quoteperso2p | did -a $dname 15 %quoteperso2s }
n40=  else { did -c $dname 11 | did -a $dname 14 %quotedefautp | did -a $dname 15 %quotedefauts | did -m $dname 14,15 }
n41=}
n42=
n43=on *:dialog:quote:sclick:4:{
n44=  if $did($dname,3,$did($dname,3).sel).text == $null { return }
n45=  if $readini system.ini quotes mode == perso1 { set -u %p %quoteperso1p | set -u %s %quoteperso1p }
n46=  elseif $readini system.ini quotes mode == perso2 { set -u %p %quoteperso2p | set -u %s %quoteperso2p }
n47=  else { set -u %p %quotedefautp | set -u %s %quotedefautp }
n48=  if $did($dname,5).sel = 1 || $did($dname,5).sel == $null { comsg $active %p $did($dname,3,$did($dname,3).sel).text %s }
n49=  else { comsg $did($dname,5,$did($dname,5).sel).text  %p $did($dname,3,$did($dname,3).sel).text %s }
n50=}
n51=
n52=
n53=on *:dialog:quote:sclick:8:{
n54=  var %q = $did($dname,7).text
n55=  if %q == $null { return }
n56=  var %q = $strip(%q)
n57=  write txt\quotes.txt %q
n58=  did -a $dname 3,6 %q
n59=  did -r $dname 7
n60=}
n61=
n62=on *:dialog:quote:sclick:9:{
n63=  var %q = $did($dname,6,$did($dname,6).sel).text
n64=  if %q == $null { return }
n65=  var %m = $read -s [ $+ [ %q ] ] txt\quotes.txt
n66=  var %l = $readn
n67=  write -dl $+ %l  txt\quotes.txt
n68=  did -d $dname 3,6 $did($dname,6).sel
n69=  did -r $dname 7
n70=}
n71=
n72=on *:dialog:quote:sclick:6:{ did -ra $dname 7 $did($dname,6,$did($dname,6).sel).text }
n73=
n74=alias qs {
n75=  if $group(#quoting_system) == on { 
n76=    if $dialog(quoting_sys) != $null { dialog -x quoting_sys }
n77=    .disable #quoting_system
n78=    unset %hotlink
n79=    return
n80=  }
n81=  dialog -m quoting_sys quoting_sys
n82=  .enable #quoting_system
n83=}
n84=
n85=#quoting_system off
n86=on ^1:hotlink:*:*:{ }
n87=on 1:hotlink:*:*:{ set %hotlink $hotline | set %hotlink $strip(%hotlink) | .timer 1 0 quoting_system_add   }
n88=#quoting_system end
n89=
n90=dialog quoting_sys {
n91=  size 200 60 240 40
n92=  title "Live mémodelireuh System"
n93=  button "stop",1,0 23 240 17,ok 
n94=  edit "- - - - - - - Double Click sur une ligne - - - - - - -",2,0 0 240 22,read center
n95=}
n96=on *:dialog:quoting_sys:init:0:{ did -f $dname 2 }
n97=on *:dialog:quoting_sys:sclick:1:{ dialog -x quoting_sys  | .disable #quoting_system | unset %hotlink }
n98=alias quoting_system_add {
n99=  var %? = $?!="Ajouter aux mémodélireuh la sitation suivante: $crlf %hotlink "
n100=  if %? && %hotlink != $null { 
n101=    write txt\quotes.txt %hotlink 
n102=    if $dialog(quoting_sys) != $null { did -ra quoting_sys 2 Quote: %hotlink }
n103=    unset %hotlink
n104=  }
n105=}
n106=alias qs {
n107=  if $group(#quoting_system) == on { 
n108=    if $dialog(quoting_sys) != $null { dialog -x quoting_sys }
n109=    .disable #quoting_system
n110=    unset %hotlink
n111=    return
n112=  }
n113=  dialog -m quoting_sys quoting_sys
n114=  .enable #quoting_system
n115=}
n116=
n117=#quoting_system off
n118=on ^1:hotlink:*:*:{ }
n119=on 1:hotlink:*:*:{ set %hotlink $hotline | set %hotlink $strip(%hotlink) | .timer 1 0 quoting_system_add   }
n120=#quoting_system end
n121=
n122=dialog quoting_sys {
n123=  size 200 60 240 40
n124=  title "enreigtrement live"
n125=  button "fermer",1,0 23 240 17,ok 
n126=  edit "- - - - - - - Double Click sur la ligne - - - - - - -",2,0 0 240 22,read center
n127=}
n128=on *:dialog:quoting_sys:init:0:{ did -f $dname 2 }
n129=on *:dialog:quoting_sys:sclick:1:{ dialog -x quoting_sys  | .disable #quoting_system | unset %hotlink }
n130=alias quoting_system_add {
n131=  var %? = $?!="Ajouter aux quotes la sitation suivante: $crlf %hotlink "
n132=  if %? && %hotlink != $null { 
n133=    write txt\quotes.txt %hotlink 
n134=    if $dialog(quoting_sys) != $null { did -ra quoting_sys 2 Quote: %hotlink }
n135=    unset %hotlink
n136=  }
n137=}
n138=alias comsg {
n139=  if $server == $null { echo2 -a $t.error Vous n'est pas connecté à un Server ! | return }
n140=  if $co_ni_mode == pref2 {  .msg $1 $2- | echo2 $$1  $+ $co_ni2meco  $+ $co_ni2mp $+  $+ $co_ni2memeco $+ $me $+  $+  $co_ni2meco $+ $co_ni2ms $+  $2- | return }
n141=  elseif $co_ni_mode == pref1 { .msg $1 $2- | echo2 $$1  $+ $co_ni1meco  $+ $co_ni1mp $+  $+ $co_ni1memeco $+ $me $+  $+  $co_ni1meco $+ $co_ni1ms $+  $2- | return }
n142=  else { msg $1 $2- }
n143=}
