Dialog encore :/

Résolu
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006 - 6 juin 2005 à 16:21
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006 - 11 juin 2005 à 15:38
Bonjour,
voila c'es la premier fois j'essai de fair eun dialog ji ai jamais rien compris lol
j'ais pris mdx studio pour essayer

jessai quand meme de comprendre le code mais je comprend pas comment faire une action apres avoir clic sur un boutton

par ex: si je clic sur play sa fasse camp Command play

comme c'es mon premier dialog j'essai de faire kkchose de pas trop compliquer ici une simple bar pour controller winamp

Et si on pouvais me dire comment placer le dialog au dessous de la switch bar ( je crois c le nom la )

code :

alias mdx_fullpath { return $+(",c:\pogo\mdx.dll,") }


alias mdx { dll $mdx_fullpath $1- }


alias mdxinit {
dll $mdx_fullpath SetMircVersion $version
dll $mdx_fullpath MarkDialog $dname
}


dialog bar {
size -1 -1 1024 38
title "BAR"
button "positioner",1001,0 0 0 0
button "play",1,3 0 60 30, flat
button "stop",2,63 0 60 30, flat
button "suivant",3,123 0 60 30, flat
button "precedent",4,184 0 60 30, flat
;the button below is auto-created.You can remove it
button "",1000,0 0 0 0,ok hide
}
on *:dialog:bar:init:00:{
mdxinit
mdx SetControlMDX $dname 1001 positioner size minbox maxbox > c:\pogo\dialog.mdx
if ($devent = sclick) { button -a $dname 3 camp Command next }


}

voila si quelqu'un pourrai m'aide ou me montrer un exemple sur un dial avec un ou deux boutton merci

10 réponses

MaX_62 Messages postés 879 Date d'inscription vendredi 22 octobre 2004 Statut Membre Dernière intervention 29 juin 2007
6 juin 2005 à 16:53
Faut réagir a l'évènement SCLICK :


on *:DIALOG:dialog:sclick:id:{ commande }


remplaces dialog, sclick et commande par les commandes appropriées...
Hésite pas a consulter l'help...

/help Dialogs



-=[MaX_62]=-
3
cs_SornDrixer Messages postés 2084 Date d'inscription jeudi 12 décembre 2002 Statut Membre Dernière intervention 30 janvier 2011 8
6 juin 2005 à 18:04
Bonjour,



Voilà un petit tutorial que j'ai fais sur les dialogs (utilisation de
Dialog Studio, un logiciel pour créer l'interface de son dialog et
placer les "items", puis explication de l'événement DIALOG) :

http://www.ircfr.com/tutorial.aspx?ID=40

<hr color="#d3d3d3">Cordialement, Sorn_Drixer (Admin CodeS-SourceS)

<!--
3
MaX_62 Messages postés 879 Date d'inscription vendredi 22 octobre 2004 Statut Membre Dernière intervention 29 juin 2007
8 juin 2005 à 06:57
Le deuxième tu as mis 2 évènements init... enlève le 2e :o)
Pour le dock, essaye : /dll ultradock.dll Dock 1 $dialog(bar).hwnd bottom bar



-=[MaX_62]=-
3
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006
6 juin 2005 à 21:45
merci MaX_62

Sorn_Drixer j'avais lu ton tuto mais j'avais pas tout enregistrer sur les

on *:DIALOG:*:*:*: { blah }
:-/
je l'ais relus et j'ai enfin imprimer :p merci a vous 2 :o)
0

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

Posez votre question
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006
8 juin 2005 à 00:20
Voila sa commence a prendre vie se premier dialog :o)
mais jais quand meme quelque probleme

problemes:
le dialog ne se dock pas automatiquement :(
j'arrive pas a colorer le dialog
je comprend pas comment faire une progres bar

DLLS:
ultradock
mdx

on *:start: dialog -m bar bar


dialog bar {
size -1 -1 1024 36
title "bar"
button "Play",1,7 0 60 30
button "Stop",2,67 0 60 30
button "Suivant",3,127 0 60 30
button "Precedent",4,186 0 60 30
button "Ovrir ",5,245 0 60 30
button "Fermer",6,305 0 60 30
;the button below is auto-created.You can remove it
button "",1000,0 0 0 0,ok hide
}
on *:DIALOG:bar:*:*: {
if ($devent == sclick) {
if ($did == 1) { camp Command play }
elseif ($did == 2) { camp Command stop }
elseif ($did == 3) { camp Command next }
elseif ($did == 4) { camp Command previous }
elseif ($did == 5) { camp LaunchWinamp }
elseif ($did == 6) { camp CloseWinamp }
}
elseif ($devent == init) {
dll mdx.dll SetMircVersion $version
dll mdx.dll MarkDialog $dname
dll ultradock.dll $dialog(bar).hwnd bottom bar
dll mdx.dll SetDialog $dname bgcolor $rgb(0,0,0)
}


}
on *:dialog:bar:init:0:{
dll mdx.dll SetMircVersion $version
dll mdx.dll MarkDialog $dname
dll ultradock.dll $dialog(bar).hwnd bottom bar
dll mdx.dll SetDialog $dname bgcolor $rgb(0,0,0)
}


;ALIAS
alias winampbar { dialog -m bar bar | $dll(ultradock.dll,$1,$2-) }
alias ctlamp return $shortfn(ctlamp\ctlamp2.dll)
alias camp { if ($isid) { return $dll($ctlamp,$1,$iif($2,$2,.)) } | else { dll $ctlamp $1 $iif($2,$2,.) } }
alias mdx_fullpath { return $+(",c:\pogo\mdx.dll,") }
alias mdx { dll $mdx_fullpath $1- }

vila jais regarde des tuto sur mdx et je comprend pas se que jais mal fait

merci :o)
0
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006
8 juin 2005 à 13:16
oupss avais pas remarquer les double init



rien que en elevent un des init le dial se colore :o)



MAX_62 merci mtn le sa se dock automatiquement :o)
0
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006
11 juin 2005 à 12:08
on *:start: dialog -m bar bar
on *:signal:ctlamp.chgsong: did -i bar 7 7 $camp(GetSongTitle)
dialog bar {
title "bar"
size -1 -1 1024 41
option pixels
icon 1, 6 2 32 32, image\play.png, 0, noborder
icon 2, 42 2 32 32, image\stop.png, 0, noborder
icon 3, 76 2 32 32, image\suivant.png, 0, noborder
icon 4, 111 2 32 32, image\precedent.png, 0, noborder
icon 5, 146 2 32 32, image\ouvrir.png, 0, noborder
text "Titre", 7, 178 12 184 23, disable result center
button "", 1000, 0 0 0 0, hide ok
text "Lag ", 8, 740 20 71 20, disable
text "Nb chans", 10, 390 20 73 20, disable
text "Undernet", 11, 391 0 73 17, disable
text "uptime", 12, 495 13 232 20, disable center
text "Ram usage", 13, 740 0 196 19, disable
box "Titre", 6, 176 0 187 39
box "Uptime", 9, 488 0 245 38
}


on *:DIALOG:bar:*:*: {
if ($devent == sclick) {
if ($did == 1) { camp Command play }
elseif ($did == 2) { camp Command stop }
elseif ($did == 3) { camp Command next }
elseif ($did == 4) { camp Command previous }
elseif ($did == 5) { camp LaunchWinamp }
}
elseif ($devent == init) {
dll mdx.dll SetControlMDX $dname 1 ToolBar list arrows flat wrap nodivider > bars.mdx
dll mdx.dll SetMircVersion $version
dll mdx.dll MarkDialog $dname
dll ultradock.dll Dock -1 $dialog(bar).hwnd top bar
lag.check
did -i bar 7 7 $camp(GetSongTitle)
stats


}
}
;ALIAS
alias mdx_fullpath { return $+(", $+ $mircdir $+ ,") }
alias mdx { dll $mdx_fullpath $1- }
alias temps { return 4 $replace($uptime(system,1),days,14jours4,1day,114jour4,1day,141jour4,hrs,14heures4,mins,14minutes4,secs,14secondes4)) }
alias temps2 { return $remove($temps,4,14,) }
alias ctlamp return $shortfn(ctlamp\ctlamp2.dll)
alias camp { if ($isid) { return $dll($ctlamp,$1,$iif($2,$2,.)) } | else { dll $ctlamp $1 $iif($2,$2,.) } }
alias stats { timerstats 0 1 $!nb.chans $!networkk $!uuptime $!Ram }
alias nb.chans { did -i bar 10 10 Nb chans $chan(0) }
alias networkk { did -i bar 11 11 $network }
alias uuptime { did -i bar 12 12 $temps2 }
alias Ram { did -i bar 13 13 Ram $dll(moo.dll,meminfo,_) }
alias lag.check { .ctcpreply $me LAG $ticks }
ON *:CTCPREPLY:LAG &: {
if ($nick == $me) && ($2 isnum) {
did -i bar 8 8 Lag $calc($ticks -$2) $+ ms
}
}

'Jour tout le monde
Bon voila je voudrais juste votre avis personnellement la barre me convient :op mais je trouve qu'il manque doute meme un petiti quelque chose ...
si vous avez des critique constructive juis prenneur c'es en etant critiqué que l'on s'ameliore
ps jais juste un probleme pour coloré avec mdx je fait -- dll mdx.dll SetDialog $dname bgcolor $rgb(0,0,0)

mais je trouve pas comment coloré les box et les texte :( jais pourtant lu l'aide de mdx ( en francais ) mais c'es assez confus :/

Voila merci a tous et bonne journée :)
0
MaX_62 Messages postés 879 Date d'inscription vendredi 22 octobre 2004 Statut Membre Dernière intervention 29 juin 2007
11 juin 2005 à 13:48
On a pas les images :/
a la limite fais un zip et mets le sur un ftp, ou bien montre une screenshot, ce sera plus pratique



-=[MaX_62]=-
0
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006
11 juin 2005 à 15:27
pas bete fait essayer :p
0
stevnet Messages postés 48 Date d'inscription mardi 19 novembre 2002 Statut Membre Dernière intervention 3 mai 2006
11 juin 2005 à 15:38
l'image es la
0
Rejoignez-nous