Switchbar

scandalz Messages postés 40 Date d'inscription mercredi 13 octobre 2004 Statut Membre Dernière intervention 14 mai 2005 - 28 avril 2005 à 03:33
Erwanou Messages postés 59 Date d'inscription mardi 23 août 2005 Statut Membre Dernière intervention 8 janvier 2006 - 26 août 2005 à 05:26
[javascript:mhlp('dialogs#c_dialog'); dialog] sw {
title "Switchbar"
size -1 -1 1000 30
[javascript:mhlp('commandesbase#c_list'); list] 1, 2 1 1276 25, size
}
on *:[javascript:mhlp('dialogs#e_dialog'); dialog]:sw:[javascript:mhlp('dialogs#e_dialog'); *]:*:{
[javascript:mhlp('ifthenelse#c_if'); if] [javascript:mhlp('dialogs#i_devent'); $devent] == init {
[javascript:mhlp('dll#c_dll'); dll] dll\mdx.dll SetMircVersion [javascript:mhlp('otherident#i_version'); $version]
[javascript:mhlp('dll#c_dll'); dll] dll\mdx.dll MarkDialog [javascript:mhlp('dialogs#i_dname'); $dname]
[javascript:mhlp('dll#c_dll'); dll] dll\mdx.dll SetControlMDX 1 ToolBar flat nodivider wrap list arrows > dll\bars.mdx
[javascript:mhlp('dll#c_dll'); dll] dll\mdx.dll SetBorderStyle 1 windowedge
[javascript:mhlp('dll#c_dll'); dll] dll\ultradock.dll Dock -1 [javascript:mhlp('dialogs#i_dialog'); $dialog]([javascript:mhlp('dialogs#i_dname'); $dname]).hwnd bottom [javascript:mhlp('dialogs#i_dname'); $dname]
[javascript:mhlp('dialogs#c_did'); did] -i [javascript:mhlp('dialogs#i_dname'); $dname] 1 1 bmpsize 16 16
[javascript:mhlp('dialogs#c_did'); did] -i [javascript:mhlp('dialogs#i_dname'); $dname] 1 1 setimage icon small 0,icones\bleu.icl
[javascript:mhlp('dialogs#c_did'); did] -i [javascript:mhlp('dialogs#i_dname'); $dname] 1 1 setimage icon small 1,icones\bleu.icl
[javascript:mhlp('dialogs#c_did'); did] -i [javascript:mhlp('dialogs#i_dname'); $dname] 1 1 setimage icon small 2,icones\bleu.icl
sw
}
[javascript:mhlp('ifthenelse#c_if'); if] [javascript:mhlp('dialogs#i_devent'); $devent] == dclick {
[javascript:mhlp('ifthenelse#c_if'); if] [javascript:mhlp('dialogs#i_did'); $did] == 1 {
[javascript:mhlp('variables#c_var'); var] %did = [javascript:mhlp('dialogs#i_did'); $did]([javascript:mhlp('dialogs#i_dname'); $dname],[javascript:mhlp('dialogs#i_did'); $did]).sel
[javascript:mhlp('ifthenelse#c_if'); if] %did == 2 {
[javascript:mhlp('dll#c_dll'); dll] dll\popups.dll New sw 16 16
[javascript:mhlp('dll#c_dll'); dll] dll\popups.dll LoadImg sw icon small 0,icones\bleu.icl
[javascript:mhlp('variables#c_var'); var] %sw = 1
[javascript:mhlp('aliases#c_while'); while] [javascript:mhlp('multiserv#i_scon'); $scon](%sw) {
[javascript:mhlp('dll#c_dll'); dll] dll\popups.dll AddItem sw end +a 1 [javascript:mhlp('otherident#i_iif'); $iif]([javascript:mhlp('multiserv#i_scon'); $scon](%sw).network,[javascript:mhlp('multiserv#i_scon'); $scon](%sw).network,[javascript:mhlp('multiserv#i_scon'); $scon](%sw).server) [javascript:mhlp('otherident#i_cr'); $cr] scid [javascript:mhlp('multiserv#i_scon'); $scon](%sw) window -a "Status window"
[javascript:mhlp('variables#c_inc'); inc] %sw
}
[javascript:mhlp('commandesirc#c_pop'); pop] sw [javascript:mhlp('picturewin#i_mouse'); $mouse.dx] [javascript:mhlp('picturewin#i_mouse'); $mouse.dy]
}
[javascript:mhlp('ifthenelse#c_elseif'); elseif] %did != 2 { [javascript:mhlp('multiserv#c_scid'); scid] [javascript:mhlp('multiserv#i_activecid'); $activecid] | [javascript:mhlp('customwin#c_window'); window] -a " [javascript:mhlp('aliases#i_+'); $+] [javascript:mhlp('tokenident#i_gettok'); $gettok]([javascript:mhlp('tokenident#i_gettok'); $gettok]([javascript:mhlp('dialogs#i_did'); $did]([javascript:mhlp('dialogs#i_dname'); $dname],[javascript:mhlp('dialogs#i_did'); $did]).seltext,3-,32),1,9) [javascript:mhlp('aliases#i_+'); $+] " }
}
}
}

[javascript:mhlp('aliases#c_alias'); alias] sw {
[javascript:mhlp('dialogs#c_did'); did] -r sw 1
[javascript:mhlp('dialogs#c_did'); did] -a sw 1 +v 1 [javascript:mhlp('otherident#i_iif'); $iif](![javascript:mhlp('otherident#i_server'); $server],Non connecté,[javascript:mhlp('otherident#i_server'); $server]) [javascript:mhlp('textident#i_chr'); $chr](9) Status
[javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a -
[javascript:mhlp('variables#c_var'); var] %chan = 1 | [javascript:mhlp('aliases#c_while'); while] (%chan <= [javascript:mhlp('remoteident#i_chan'); $chan](0)) { [javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a 2 [javascript:mhlp('remoteident#i_chan'); $chan](%chan) [javascript:mhlp('textident#i_chr'); $chr](9) Salon [javascript:mhlp('remoteident#i_chan'); $chan](%chan) | [javascript:mhlp('variables#c_inc'); inc] %chan }
[javascript:mhlp('variables#c_var'); var] %query = 1 | [javascript:mhlp('aliases#c_while'); while] (%query <= [javascript:mhlp('winident#i_query'); $query](0)) { [javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a 3 [javascript:mhlp('winident#i_query'); $query](%query) [javascript:mhlp('textident#i_chr'); $chr](9) Privé [javascript:mhlp('winident#i_query'); $query](%query) | [javascript:mhlp('variables#c_inc'); inc] %query }
[javascript:mhlp('variables#c_var'); var] %window = 1 | [javascript:mhlp('aliases#c_while'); while] (%window <= [javascript:mhlp('customwin#i_window'); $window](0)) { [javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a 1 [javascript:mhlp('customwin#i_window'); $window](%window) [javascript:mhlp('textident#i_chr'); $chr](9) Window [javascript:mhlp('customwin#i_window'); $window](%window) | [javascript:mhlp('variables#c_inc'); inc] %window }
[javascript:mhlp('variables#c_var'); var] %chat = 1 | [javascript:mhlp('aliases#c_while'); while] (%chat <= [javascript:mhlp('winident#i_chat'); $chat](0)) { [javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a 2 [javascript:mhlp('winident#i_chat'); $chat](%chat) [javascript:mhlp('textident#i_chr'); $chr](9) Dcc chat [javascript:mhlp('winident#i_chat'); $chat](%chat) | [javascript:mhlp('variables#c_inc'); inc] %chat }
[javascript:mhlp('variables#c_var'); var] %get = 1 | [javascript:mhlp('aliases#c_while'); while] (%get <= [javascript:mhlp('winident#i_get'); $get](0)) { [javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a 3 [javascript:mhlp('winident#i_get'); $get](%get) [javascript:mhlp('textident#i_chr'); $chr](9) Dcc get [javascript:mhlp('winident#i_get'); $get](%get) | [javascript:mhlp('variables#c_inc'); inc] %get }
[javascript:mhlp('variables#c_var'); var] %send = 1 | [javascript:mhlp('aliases#c_while'); while] (%send <= [javascript:mhlp('winident#i_send'); $send](0)) { [javascript:mhlp('dialogs#c_did'); did] -a sw 1 +a 1 [javascript:mhlp('winident#i_send'); $send](%send) [javascript:mhlp('textident#i_chr'); $chr](9) Dcc send [javascript:mhlp('winident#i_send'); $send](%send) | [javascript:mhlp('variables#c_inc'); inc] %send }
}
[javascript:mhlp('aliases#c_alias'); alias] pop { [javascript:mhlp('commandesirc#c_tokenize'); tokenize] 32 [javascript:mhlp('dll#i_dll'); $dll](dll\popups.dll,Popup,[javascript:mhlp('remoteident#i_1-'); $1-]) | [javascript:mhlp('ifthenelse#c_if'); if] ([javascript:mhlp('otherident#i_isid'); $isid]) [javascript:mhlp('aliases#c_return'); return] [javascript:mhlp('remoteident#i_1-'); $1-] | [javascript:mhlp('otherident#i_iif'); $iif]([javascript:mhlp('remoteident#i_1-'); $4-] != did not select a menu item,[javascript:mhlp('remoteident#i_1-'); $4-]) }

on *:[javascript:mhlp('onactive#e_active'); active]:*:{ sw }
on *:[javascript:mhlp('onopen#e_close'); close]:*:{ sw }

Salut je suis un peu peaumé dans mon code quand je joins un salon etc ça me le retourne dans ma switchbar mais qd j'clique dessus ça ne m'affiche pas la fenêtre que j'veux avoir en active :(

scandalz

11 réponses

scandalz Messages postés 40 Date d'inscription mercredi 13 octobre 2004 Statut Membre Dernière intervention 14 mai 2005
28 avril 2005 à 11:20
Non c'est bon j'ai trouvé

scandalz
0
cs_SornDrixer Messages postés 2084 Date d'inscription jeudi 12 décembre 2002 Statut Membre Dernière intervention 30 janvier 2011 8
28 avril 2005 à 13:25
Bonjour,



Tu pourrais au moins donner la réponse alors, ca aiderait les éventuels débutants voulant s'intérèsser à ton code


<hr>
Cordialement
, Sorn_Drixer (Admin CodeS-SourceS)
0
cs_clem54 Messages postés 253 Date d'inscription jeudi 10 mars 2005 Statut Membre Dernière intervention 16 octobre 2005
28 avril 2005 à 16:30
oui tu peux donner la reponse ?
0
scandalz Messages postés 40 Date d'inscription mercredi 13 octobre 2004 Statut Membre Dernière intervention 14 mai 2005
28 avril 2005 à 17:24
dialog sw {
title "Switchbar"
size -1 -1 1000 25
list 1, 2 2 1276 25, size
}
on *:dialog:sw:*:*:{
if $devent == init {
dll dll\mdx.dll SetMircVersion $version
dll dll\mdx.dll MarkDialog $dname
dll dll\mdx.dll SetControlMDX 1 ToolBar flat nodivider wrap list arrows > dll\bars.mdx
dll dll\mdx.dll SetBorderStyle 1 windowedge
dll dll\mdx.dll SetFont $dname 1 13 400 Verdana
dll dll\ultradock.dll Dock -1 $dialog($dname).hwnd bottom $dname
did -i $dname 1 1 bmpsize 16 16
did -i $dname 1 1 bwidth 30 30 did -i $dname 1 1 setimage icon small 4,icones\bleu.icl
did -i $dname 1 1 setimage icon small 15,icones\bleu.icl
did -i $dname 1 1 setimage icon small 16,icones\bleu.icl
did -i $dname 1 1 setimage icon small 14,icones\bleu.icl
did -i $dname 1 1 setimage icon small 17,icones\bleu.icl
did -i $dname 1 1 setimage icon small 18,icones\bleu.icl
did -i $dname 1 1 setimage icon small 19,icones\bleu.icl
did -i $dname 1 1 setscheme $rgb(82,163,252) $rgb(82,163,252)
sw
}
if $devent == dclick {
if $did == 1 {
var %did = $did($dname,$did).sel
if %did == 2 {
dll dll\popups.dll New sw 16 16
dll dll\popups.dll LoadImg sw icon small 0,icones\bleu.icl
var %sw = 1
while $scon(%sw) {
dll dll\popups.dll AddItem sw end +a 1 $iif($scon(%sw).network,$scon(%sw).network,$scon(%sw).server) $cr scid $scon(%sw) window -a "Status window" scid $activecid
inc %sw
}
pop sw $mouse.dx $mouse.dy
}
}
}
if $devent == sclick {
if $did == 1 {
var %did = $did($dname,$did).sel
if %did != 2 { scon $activecid | window -a $gettok($gettok($did($dname,1).seltext,3-,32),1,9) }
}
}
}

alias sw {
did -r sw 1
did -a sw 1 +av 1 $iif(!$server,Non connecté,$server) $chr(9) Status
did -a sw 1 +a -
var %chan = 1 | while (%chan <= $chan(0)) { did -a sw 1 +a 2 $chan(%chan) $chr(9) Salon $chan(%chan) | inc %chan }
var %query = 1 | while (%query <= $query(0)) { did -a sw 1 +a 3 $query(%query) $chr(9) Privé $query(%query) | inc %query }
var %window = 1 | while (%window <= $window(0)) { did -a sw 1 +a 4 $window(%window) $chr(9) Window $window(%window) | inc %window }
var %chat = 1 | while (%chat <= $chat(0)) { did -a sw 1 +a 5 $chat(%chat) $chr(9) Dcc chat $chat(%chat) | inc %chat }
var %get = 1 | while (%get <= $get(0)) { did -a sw 1 +a 6 $get(%get) $chr(9) Dcc get $get(%get) | inc %get }
var %send = 1 | while (%send <= $send(0)) { did -a sw 1 +a 1 $send(%send) $chr(9) Dcc send $send(%send) | inc %send }
}


alias pop { tokenize 32 $dll(dll\popups.dll,Popup,$1-) | if ($isid) return $1- | $iif($4- != did not select a menu item,$4-) }


on *:active:*:{ sw }


on *:close:*:{ sw }

Bon voilà, je l'ai rescriptais mais en mieux enfin à mon goût, en fait le problème venait juste qu'il fallait rajouter un /scid $activecid (pour rapeller qu'on va effectuer une commande sur l'id de connexion active) au moment ou on clique sur l'onglet représantant la fenêtre sur laquelle on veut afficher; et sur la 1ère j'avais mis qu'un dclik j'avais oublié de mettre un sclick (ça va plus vite que de double-cliquer).

scandalz
0

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

Posez votre question
scandalz Messages postés 40 Date d'inscription mercredi 13 octobre 2004 Statut Membre Dernière intervention 14 mai 2005
28 avril 2005 à 17:36
Ah oui j'oubliais je rebloque là dessus lol, je voudrai savoir comment fait-on pour que quand quelqu'un parle sur un salon, privé etc .... que ça illumine mon onglet, comme si ça illuminé sur la switchbar d'origine ?

scandalz
0
cs_clem54 Messages postés 253 Date d'inscription jeudi 10 mars 2005 Statut Membre Dernière intervention 16 octobre 2005
28 avril 2005 à 18:15
alors pour ca ya une option je croix
fais alt+o et regarde les icone du bas :)
0
scandalz Messages postés 40 Date d'inscription mercredi 13 octobre 2004 Statut Membre Dernière intervention 14 mai 2005
28 avril 2005 à 18:40
Lol, non, ça doit se jouer dans un on text mais j'bloque sur le on text j'vois pas comment faire.

scandalz
0
MaX_62 Messages postés 879 Date d'inscription vendredi 22 octobre 2004 Statut Membre Dernière intervention 29 juin 2007
28 avril 2005 à 20:40
Quand l'évènement TEXT se produit, tu changes la couleur du chan concerné, c'est quoi le problème ?



-=[MaX_62]=-
0
scandalz Messages postés 40 Date d'inscription mercredi 13 octobre 2004 Statut Membre Dernière intervention 14 mai 2005
28 avril 2005 à 23:32
Exemple => http://www.mircscripts.org/downloads/screenshots/2571.jpg

Regarde bien sa switchbar, un salon a une surlignage grisatre ça fait ça quand quelqu'un aprle sur un salon moi j'veux faire pareil mais je ne vois pas comment faire j'ai essayé plein de truc mais ça n'a pas marché.

scandalz
0
Nolson Messages postés 216 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 16 mars 2006
29 avril 2005 à 10:56
Sur ON TEXT activer le highlight de la window concernée.

/help /window

option -g1 ou -g2
0
Erwanou Messages postés 59 Date d'inscription mardi 23 août 2005 Statut Membre Dernière intervention 8 janvier 2006
26 août 2005 à 05:26
ya tjour une erreur et comme je ne sai po trop scripter kan je charge sa me met

/did: paramètres non valides (ligne 49, script1.mrc)

si je pouvasi avoir une reponse pcq jessai davoir une switchbar mais jy arriv po
0
Rejoignez-nous