Besoin d'aide pour finaliser un dialog avec raccourcis de pseudos....

Résolu
cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005 - 23 mai 2005 à 18:24
cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005 - 26 mai 2005 à 11:04
salut j'ai un gros probleme pour moi et sans aucun doute un minimime pour vous^^ !
j'ai fait un dialog dans le quel j'aimerai inclure un "changeur de pseudo" avec "!"

mon code de depart est
on *:input:#:{
if ($1 = = !d) {
/nick Dudulle
}
if ($1 = = etc........
}
}
mon probleme est comment faire pour qu'en entrant un pseudo (ex Dudulle) et un raccourcis (ex d )je puisse retrouver dans une liste de mon dialogue la liste des pseudo et des raccourcis...en fait les ecrire...et les lister^^
j'espere que je suis claire, certaines parties de l'aide de mirc me semble encore etre en chinois^^
merci d'avance pour vos reponses!!:p

12 réponses

cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005
26 mai 2005 à 11:04
bon ne cherché plus j'ai trouvé ma solution...avec /loadbuf et un petit fichier text!!
http://www.ircfr.com/forum.v2.aspx?id=445370

qui cherche ! trouvera!!....la verité etait ailleurs!mais pas bien loin^^
thxxxxxxxx
3
fjxokt Messages postés 840 Date d'inscription vendredi 28 janvier 2005 Statut Membre Dernière intervention 25 février 2009 1
23 mai 2005 à 18:33
j'ai vraiment pas compris ce que tu racontais là...



si tu veux avoir un raccourici et la commande (ou ce que tu veux) qui
correspond, tu ecrit dans un fichier text une ligne sous la forme:
raccourci [token] commande



sois plus clair stp
0
MaX_62 Messages postés 879 Date d'inscription vendredi 22 octobre 2004 Statut Membre Dernière intervention 29 juin 2007
23 mai 2005 à 18:33
Salut,
Je pense que l'utilisation des hash tables serait appropriée :
- Pour ajouter un raccourci et un pseudo :
/hadd -m pseudos $$input(Raccourci ?,e,Raccourci pseudo,!) $$input(Pseudo ?,e,Raccourci pseudo,$me) | /hsave pseudos pseudos
- Pour supprimer un raccourci :
/hdel pseudos raccourci | /hsave pseudos pseudos
- Pour l'évènement INPUT :
on *:INPUT:#:{
if ($hget(pseudos,$1)) { nick $ifmatch }
}


-=[MaX_62]=-
0
cs_wims Messages postés 2466 Date d'inscription vendredi 23 juillet 2004 Statut Membre Dernière intervention 1 août 2010 1
23 mai 2005 à 19:45
Tu peux aussi faire avec les variable si tu comprend pas els fichier texte ou les htable

Dans ton dialog tu peux faire un $$input comme Max_62

var %z $$input(Pseudo ?,e,Raccourci pseudo,$me) | set %pseudo $addtok(%pseudo,%z,44)

var %y $$input(Raccourci ?,e,Raccourci pseudo,!) | set %command $addtok(%command,%y,44)



Et dans ton dialog tu fait deux liste,une avec les pseudo et une autre avec les raccourcis.Dans l'init tu peux faire ca :

on *:dialog:*:*:*:{

if ($dname == nom) {

if ($devent == init) { refresh }

}

}



Et :

alias refresh {

did -r nom

did -r nom

didtok nom 44 %pseudo

didtok nom 44 %command

}



voila ta 3 solution now :)
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Milk0z Messages postés 54 Date d'inscription mercredi 29 décembre 2004 Statut Membre Dernière intervention 1 juin 2005
23 mai 2005 à 19:46
mmmh!

http://www.ircfr.com/code.aspx?id=31331

si ca peut t'aider
0
cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005
24 mai 2005 à 11:03
on *:dialog:cps:sclick:77:{
set %CutNick $did(8)
set %ShortNick $did(9)
.write -s} $mircdir\Systeme1\remotes\Pseudo if ($1 == $did(9) $chr(41) $chr(123) /nick %CutNick $chr(125) | /write -a $mircdir\Systeme1\remotes\Pseudo $chr(125)
.didtok cps 73 C %CutNick %ShortNick
.load -rs $mircdir\Systeme1\remotes\Pseudo
.unset %CutNick
.unset %ShortNick
}
voila ce que j'avais trouvé pour l'instant, ça fonctionne,impec mais je voudrais pouvoir effectivement supprimer une ligne ou la totalite dans la liste si besoin,sur un clic de boutons(un bouton pour tout, un bouton pour la ligneselectionnée)....
en attendant, je regarde tout ce que vous m'avez donnez...merci pour vos reponses!:)
0
cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005
24 mai 2005 à 11:31
euh j'oubliais ...j'ai deja le fichier avec le on *:input:*:{
if( $1 = = !re) { /nick %nick
}
de crée....bon chut!..
0
cs_wims Messages postés 2466 Date d'inscription vendredi 23 juillet 2004 Statut Membre Dernière intervention 1 août 2010 1
24 mai 2005 à 16:20
.write -s} $mircdir\Systeme1\remotes\Pseudo

euh la ta une accolla qui traine

J'comprend rien au code c'est pas clair du tout, on pourrai avoir le dialog ?
0
MaX_62 Messages postés 879 Date d'inscription vendredi 22 octobre 2004 Statut Membre Dernière intervention 29 juin 2007
24 mai 2005 à 17:01
C'est clair que ce code est loin d'etre clair...



-=[MaX_62]=-
0
cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005
24 mai 2005 à 17:28
dialog cps {
title "Commandes Services IRc"
size -1 -1 290 219
option dbu notheme
icon C:\Documents and Settings\Melodie.MELODIE-TV21S5E\Bureau\icones\Entire Network.ico, 0
tab "Nickserv/Commandes Pseudos", 1, 1 -2 240 205
text " Drop pseudo", 6, 15 66 32 6, tab 1
check "", 12, 7 43 6 6, disable tab 1
text "Group", 16, 16 44 14 6, tab 1
text "Kill Ghost", 17, 16 55 22 6, tab 1
text "Pseudo", 18, 79 22 18 6, tab 1
edit "", 34, 56 87 151 10, tab 1 text "couleurs Ctrl +k gras Ctrl+b souligné = Ctrl+u", 35, 8 97 129 8, tab 1
check "", 11, 7 32 6 6, disable tab 1
text "Identifier", 15, 15 33 22 6, tab 1
edit "", 21, 57 43 71 10, tab 1
edit "", 22, 57 54 71 10, tab 1
edit "", 78, 57 65 71 10, tab 1
check "", 14, 7 65 6 6, disable tab 1
check "", 13, 7 54 6 6, disable tab 1
edit "", 30, 136 65 71 10, tab 1 pass
edit "", 26, 136 54 71 10, tab 1 pass
edit "", 25, 136 43 71 10, tab 1 pass
edit "", 24, 136 32 71 10, tab 1 pass
text "Msg d'entrée", 33, 16 88 31 6, tab 1
check "", 32, 7 88 6 6, disable tab 1
button "ok", 23, 213 32 11 10, tab 1 ok
button "ok", 28, 213 54 11 10, tab 1 ok
button "ok", 31, 213 65 11 10, tab 1 ok
text "Passe", 19, 160 22 14 6, tab 1
check "", 37, 7 76 6 6, disable tab 1
text "changer de passe", 36, 15 77 44 6, tab 1
button "ok", 27, 213 43 11 10, tab 1 ok
edit "", 4, 136 76 71 10, tab 1 pass
edit "", 8, 57 132 47 10, tab 1
text "raccourcis (ex !n )", 10, 164 122 52 6, tab 1
text "pseudo", 74, 67 122 17 6, tab 1
text "Ajout", 7, 18 133 13 6, tab 1
check "", 5, 7 132 6 6, disable tab 1
list 73, 58 146 149 37, tab 1 size edit vsbar
button "supprimer", 75, 58 186 67 12, tab 1
button "supprimer tout", 76, 142 186 67 12, tab 1
edit "", 9, 163 132 44 10, tab 1
button "ok", 77, 213 132 11 10, tab 1 ok
button "ok", 71, 213 76 11 10, tab 1 ok
button "ok", 29, 213 87 11 10, tab 1 ok
box "", 124, 4 108 232 94, disable tab 1
box "", 125, 4 16 232 94, disable tab 1
tab "Chanserv/Commandes Salons", 3
edit "", 38, 63 26 71 10, tab 3
edit "", 39, 138 26 71 10, tab 3 pass
edit "", 41, 138 39 71 10, tab 3 pass
text "Salon (ex #fantomette)", 42, 70 17 59 6, tab 3
text "Mot de passe", 43, 154 17 33 6, tab 3
check "", 44, 5 26 6 6, disable tab 3
check "", 45, 5 39 6 6, disable tab 3
edit "", 40, 63 39 71 10, tab 3
text "Enregistrer", 46, 14 27 30 8, tab 3
text "Identifier owner", 47, 14 41 40 8, tab 3
text "Changer le passe", 48, 13 81 47 8, tab 3
edit "", 50, 63 52 146 10, tab 3
check "", 49, 5 53 6 6, disable tab 3 text "couleurs Ctrl +k gras Ctrl+b souligné = Ctrl+u", 52, 8 63 129 8, tab 3
text "Salon ", 61, 80 71 16 8, tab 3
edit "", 60, 159 79 50 10, tab 3
edit "", 54, 63 79 52 10, tab 3
text "Nveau passe", 63, 166 71 32 8, tab 3
text "Changer créateur", 56, 14 97 46 8, tab 3
edit "", 58, 63 96 71 10, tab 3
edit "", 59, 138 96 71 10, tab 3
button "ok", 64, 211 27 12 9, tab 3 ok
button "ok", 66, 211 53 12 9, tab 3 ok
button "ok", 65, 211 40 12 9, tab 3 ok
text "Message d'accueil", 51, 14 53 46 8, tab 3
text "Salon ", 67, 80 89 16 7, tab 3
text "Nvel Owner", 68, 166 89 33 7, tab 3
check "", 53, 5 80 6 6, disable tab 3
check "", 57, 5 96 6 6, disable tab 3
button "ok", 69, 211 80 12 9, tab 3 ok
button "ok", 70, 211 97 12 9, tab 3 ok
text "Pour Créer votre salon", 79, 28 118 58 9, tab 3
text "1/enregistrer votre pseudo sur le serveur choisi", 80, 27 133 117 9, tab 3
button "assigner un bot", 84, 97 166 55 9, tab 3
text "5/creez votre Topic visible a l'entrée et en tapant /list", 86, 27 189 131 10, tab 3
text "2/joignez le salon en tapant : /join #nom_de_votre_salon", 81, 27 144 139 9, tab 3
text "3/enregistrer votre salon (cf ci-dessus)", 82, 27 155 98 9, tab 3
text "4/faire joindre un botserv _", 83, 27 166 68 9, tab 3
text "5/creer votre message d'accueil du chan", 85, 27 177 126 10, tab 3
box "", 126, 4 112 234 91, disable tab 3
tab " Couleurs Pseudos ", 87
edit "00", 88, 34 18 13 10, tab 87
edit "01", 89, 49 18 13 10, tab 87
edit "03", 91, 79 18 13 10, tab 87
edit "04", 92, 94 18 13 10, tab 87
edit "11", 98, 79 31 13 10, tab 87
edit "12", 99, 94 31 13 10, tab 87
edit "10", 97, 64 31 13 10, tab 87
edit "09", 96, 49 31 13 10, tab 87
edit "08", 95, 34 31 13 10, tab 87
edit "06", 94, 124 18 13 10, tab 87
edit "05", 93, 109 18 13 10, tab 87
edit "13", 100, 109 31 13 10, tab 87
edit "14", 101, 124 31 13 10, tab 87
edit "07", 102, 138 18 13 10, tab 87
edit "15", 103, 138 31 13 10, tab 87
text "COULEURS exemple", 104, 164 25 60 7, tab 87
box "", 105, 7 12 226 40, disable tab 87
edit "", 108, 58 69 15 10, tab 87
edit "", 112, 80 69 15 10, tab 87
edit "", 107, 28 69 15 10, tab 87
text "Mon Pseudo", 109, 13 80 31 8, tab 87
text "Ircops", 111, 58 80 17 8, tab 87
edit "", 114, 102 69 15 10, tab 87
text "Ops", 113, 82 80 11 8, tab 87
text "Halfops", 115, 100 80 20 8, tab 87
edit "", 116, 123 69 15 10, tab 87
edit "", 117, 145 69 15 10, tab 87
edit "", 121, 187 69 15 10, tab 87
edit "", 120, 166 69 15 10, tab 87
text "Ignores", 122, 165 80 18 8, tab 87
box "", 106, 7 52 226 40, disable tab 87
edit "02", 90, 64 18 13 10, tab 87
text "Voices", 118, 124 80 16 8, tab 87
text "Aways", 119, 144 80 18 8, tab 87
text "Normaux", 123, 186 80 22 8, tab 87
edit "", 127, 208 69 15 10, tab 87
link "http://perso.wanadoo.fr/fantomette", 130, 72 157 90 8, tab 87
button "rafraichir", 110, 175 94 28 10, tab 87
check "rafraichissement toutes les", 131, 15 95 71 10, tab 87
text "Bannis", 128, 210 80 17 8, tab 87
button "-", 20, 17 70 8 8, tab 87
button "-", 132, 62 60 8 8, tab 87
button "-", 133, 84 60 8 8, tab 87
button "-", 134, 106 60 8 8, tab 87
button "-", 138, 191 60 8 8, tab 87
button "-", 137, 170 60 8 8, tab 87
button "-", 136, 149 60 8 8, tab 87
button "-", 135, 127 60 8 8, tab 87
button "-", 139, 211 60 8 8, tab 87
edit "", 140, 88 94 21 11, tab 87
text "minutes", 141, 114 96 22 8, tab 87
check "Lors des évenements (mode auto)", 142, 15 108 92 10, tab 87
button "fermer", 2, 82 206 72 12, ok cancel
button "Desactiver", 143, 14 122 37 12, tab 87
button "Activer", 144, 57 122 37 12, tab 87
icon 129, 247 5 37 207,$shortfn($mircdir\images\light2.jpg), 0, noborder
}
(......)
on *:dialog:cps:sclick:77:{
set %CutNick $did(8)
set %ShortNick $did(9)
.write -s} $mircdir\Systeme1\remotes\Pseudo if ($1 == $did(9) $chr(41) $chr(123) /nick %CutNick $chr(125) | /write -a $mircdir\Systeme1\remotes\Pseudo $chr(125)
.didtok cps 73 C %CutNick %ShortNick
.load -rs $mircdir\Systeme1\remotes\Pseudo
.unset %CutNick
.unset %ShortNick
}
et sur le fichier "pseudo"
on * :input:*: {
if ($1 == !re ) { /nick %nick }
}
(la variable %nick est etablie sur un autre fichier...j'vais pas tout coller!! deja rien que le dialog ça prend de la place^^!

pour l'accolade ,je sais, j'l'ai oubliée en postant mais on peut pas editer...^^
0
cs_melodie28 Messages postés 24 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2005
24 mai 2005 à 17:36
en fait mon probleme est de transcrire le pseudo et le raccourcis dans la liste (ex dudulle !d)..et ensuite de pouvoir supprimer une ligne ou la totalité (c'est juste un pense bete en cas d'oubli des raccourcis....)
0
cs_wims Messages postés 2466 Date d'inscription vendredi 23 juillet 2004 Statut Membre Dernière intervention 1 août 2010 1
25 mai 2005 à 12:23
Hé mais c'est pas interdit les dialog comme ca ;( ?

Nan mais il est trop enorme ton dialog, fait en plusieur
0
Rejoignez-nous