Notify liste

Contenu du snippet

Ce dialog vous permez de vous avertir quand l'un de vos amis se connect sur un server IRC.

Source / Exemple :


alias notify.liste dialog -m notify notify
dialog Notify {
  title "Notify Liste"
  size -1 -1 118 143
  option dbu
  box "Notify", 1, 2 73 114 50
  text "Pseudo :", 2, 4 80 26 8
  edit "", 3, 26 79 88 10
  button "Ajouter", 4, 3 90 37 12
  button "Modifier", 5, 40 90 38 12
  button "Supprimer", 6, 78 90 37 12
  check "Activer", 7, 75 112 50 10
  box "Off-Line", 8, 60 0 56 73
  box "On-Line", 9, 2 0 56 73
  list 10, 4 8 52 63, size
  list 11, 62 8 52 63, size
  button "Quitter", 12, 3 130 112 10, ok
  text "Jouer un son :", 13, 4 103 35 8
  button $nopath(%ns), 14, 40 102 59 10
  button "!", 15, 99 102 16 10
  check "Effectuer un whois", 16, 18 112 52 10
  box "Fermeture", 17, 2 123 114 18
}
ON *:DIALOG:notify:*:*: { 
  if $devent == init || $did == 0 {
    load.notify 
    if (%nw == on) .did -c $dname 16 
    if (%na == on) .did -c $dname 7 
  }
  if $devent == sclick {
    if ($did == 4) && ($did(3)) notify.affich 
    if ($did == 5) notify.modif 
    if ($did == 6) unload.notify 
    if ($did == 10) && ($did(10).seltext) .did -ra notify 3 $did(10).seltext 
    if ($did == 11) && ($did(11).seltext) .did -ra notify 3 $did(11).seltext 
    if ($did == 14) { 
      if (!$did(14)) { set %ns $dir="Choisis le son qui sera joué" *.wav | .did -a notify 14 $nopath(%ns) } 
      else { unset %ns | .did -r notify 14 } 
    }
    if ($did == 15) && ($did(14)) splay %ns 
    if ($did(16).state == 0) set %nw off 
    else set %nw on 
    if ($did(7).state == 0) set %na off 
    else set %na on 
  }
}
alias notify.affich { .notify $did(notify,3) | .did -r notify 3 | .timer 1 1 load.notify | halt }
alias load.notify {
  .did -r notify 10,11
  var %n = 1 
  while (%n <= $notify(0) ) {
    if ($notify(%n).ison == $true) did -a notify 10 $notify(%n)
    elseif ($notify(%n).ison == $false) did -a notify 11 $notify(%n) 
    inc %n
  }
}
alias unload.notify { 
  if ($did(10).sel != $null) { set %nr 10 | set %nr1 $did(10).sel }
  if ($did(11).sel != $null) { set %nr 11 | set %nr1 $did(11).sel }
  .notify -r $did(notify,%nr,%nr1).text
  did -r notify %nr $+ ,3
  .load.notify
  unset %nr
  unset %nr1
}
alias notify.modif { .notify $did(notify,3) | unload.notify }

Conclusion :


Pour ouvrire ce dialog tapez : /notify.liste

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.