Soyez le premier à donner votre avis sur cette source.
Vue 3 051 fois - Téléchargée 105 fois
;____________________menu________________________ menu status,nicklist,menubar { - Winfo Chan V1.1:wchanstat - } ;____________________Alias________________________ alias wchanstat { if ($status != connected) { return $input(Vous devez être connecté à un serveur avant d'ouvrir l'addon.,ow,WorldDMT - Info des canaux) } dialog $iif($dialog(wstat),-v,-m wstat) wstat } alias wDLL return dll $qt($scriptdirdll's/mdx.dll) alias tchan didtok wstat 1 32 $regsubex($str(a,$chan(0)),/(a)/g,$+($iif($me ison $chan(\n),$chan(\n)),$chr(32))) alias wjp { if ($dialog(wstat)) { did -h wstat 4,5-29,30 did -r wstat 1 tchan did -c wstat 1 1 } } ;____________________Dialog_______________________ dialog wstat { title WorldDMT - Info des canaux size -1 -1 646 290 option pixels notheme combo 1, 10 63 100 70, drop button Voir Info, 2, 118 64 80 18, flat button Quitter, 3, 204 64 80 18, ok flat text Info du Chan:, 4, 10 96 100 17 text , 5, 111 96 250 17 text Topic Du Chan:, 6, 10 114 75 17 button , 7, 10 131 632 50 text Mode du channel:, 8, 10 180 85 17 text , 9, 99 180 295 17 text Total chatteurs:, 10, 10 195 80 17 text , 11, 92 195 100 17 text Le nombre, 12, 79 221 65 17, center text Pourcentage, 13, 152 221 62 17, center text Operateurs:, 14, 10 240 60 17 text , 15, 79 240 65 17, right text , 16, 159 240 40 17, right text Voices:, 17, 10 259 60 17 text , 18, 79 259 65 17, right text , 19, 159 259 40 17, right text Autres:, 20, 10 279 60 17 text , 21, 79 279 65 17, right text , 22, 159 279 40 17, right box , 23, 5 231 213 69 box , 24, 75 214 76 86 box , 25, 149 214 69 86 box , 26, 5 251 213 28 box Le résultat graphique, 27, 229 214 415 86 text , 28, 234 240 405 17 text , 29, 234 259 405 17 text , 30, 234 279 405 17 icon 31, 0 0 650 60, statpic.jpg, 0 noborder } ;_______________________event_________________________ on *:dialog:wstat:*:*: { if ($devent == init) { $wDLL SetMircVersion $version $wDLL MarkDialog $dname $wDLL SetDialog $dname bgcolor $rgb(255,255,255) $wDLL SetDialog $dname style border $wDLL SetColor $dname 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,27,28,29,30 background $rgb(255,255,255) $wDLL SetColor $dname 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,27 textbg $rgb(255,255,255) $wDLL SetColor $dname 28,29,30 text $rgb(255,0,0) $wDLL SetColor $dname 28,29,30 textbg $rgb(255,0,0) $wDLL SetControlMDX $dname 7 window > dll's/dialog.mdx window -Bw0+d @topic did -a $dname 7 grab $window(@topic).hwnd @topic did -h $dname 4,5-29,30 tchan did -c $dname 1 1 } if ($devent == sclick) { if ($did == 2) { if ($did(1)) && ($status == connected) && ($me ison $did(1).seltext) { did -v $dname 4,5-29,30 var %chan $did(1).seltext,%op $round($calc($nick(%chan,0,o) / $nick(%chan,0) * 100),0) $+ $chr(37),%v $round($calc($nick(%chan,0,v) / $nick(%chan,0) * 100),0) $+ $chr(37),%u $round($calc($nick(%chan,0,hr) / $nick(%chan,0) * 100),0) $+ $chr(37) did -ra $dname 5 %chan clear @topic if ($chan(%chan).topic) echo @topic $chan(%chan).topic did -ra $dname 9 $chan(%chan).mode did -ra $dname 11 $nick(%chan,0) did -ra $dname 15 $nick(%Chan,0,o) did -ra $dname 16 %op did -ra $dname 18 $nick(%Chan,0,v) did -ra $dname 19 %v did -ra $dname 21 $nick(%Chan,0,hr) did -ra $dname 22 %u did -ra $dname 28 $chr(124) $+ $str($chr(124),%op) did -ra $dname 29 $chr(124) $+ $str($chr(124),%v) did -ra $dname 30 $chr(124) $+ $str($chr(124),%u) } else { dialog -x wstat return $input(WorldDMT - Info des canaux a été fermé. Pour plus de précaution $+ $chr(44) veuillez vérifier si vous êtes connecté au serveur $+ $chr(44) ou vous êtes encore sur le Chan sélectionné ensuite ouvrez l'addon,ow,WorldDMT - Info des canaux) } } } } on me:*:join:#:wjp on me:*:part:#:.timer 1 1 wjp on *:load:return $input(WorldDMT - Info des canaux a été bien installé.,o,WorldDMT - Info des canaux) ;________________________fin__________________________
j'ai la regex mais pas regsubex encore
/g < fait partis de la lib des regex
\n \A \1 < fait partie de mirc
$regex(Ga is Ga,/a/) retourne 1, parce qu'il match une fois et c'est finis.
$regex(Ga is Ga,/a/g) match 2 fois, le premier a et le deuxieme, les parenthèse autour de (a) permette de pouvoir ce référé au \Nieme truc matché, que l'on voudrai récupéré après, regarde $regml...
donc si je comprend si le nom est "aaaaa" le text qui est en "/(a)" se transforme en "de 1 à 5" et "/g" qui fera un genre de loop pour "\n"?
le g indique que l'on veut effectué le match autant de fois que possible, les parenthèse autour du a permet de récupéré les infos lorsque qu'on remplace le texte, tel que \1, \n etc//
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.