|
Jow
|
Jow
|
Good EveningI created an auto-join dialog but I do not know how to make it work on mirc. My idea would be of all saved channels is in the autojoin.ini file Below the dialog I created
dialog autojoin {
title "«‡» Auto-Join «‡» [Deixe em branco caso não tenha senha]"
size -1 -1 281 125
option dbu
icon scripts\icones\iconlim256.ico, 0
box "", 1, 3 -1 276 123
text "Canal:", 2, 7 7 17 8
edit "#", 3, 24 6 60 10
text "Rede:", 4, 8 19 16 8
edit "", 5, 24 18 60 10
text "Senha:", 6, 6 31 18 8
edit "", 7, 24 30 60 10
list 8, 90 4 186 115, size
button "Adicionar", 9, 6 49 37 12, default
button "Remover", 10, 47 49 37 12
check "Auto-Join depois de identificar", 11, 6 70 84 10
check "Ativar Auto-Join", 12, 6 82 50 10
button "Fechar", 13, 26 100 37 12, ok
}
If someone can help me ... I'll be grateful.
|
|
|
|
Joined: Mar 2010
Posts: 144
Vogon poet
|
Vogon poet
Joined: Mar 2010
Posts: 144 |
We usually create an alias with the same name as dialog (or any preferred name). But for this case since /autojoin is an mIRC built-in command, you should use another name. alias AJD { dialog $iif(!$dialog(autojoin),-m autojoin, -v) autojoin } And then just use the /AJD to run the dialog.
Nothing...
|
|
|
|
Jow
|
Jow
|
Hello Masoud Thanks for the info this command made the Auto-Join dialog open on the screen ... To post the code where I tried to do to amazenar all the channel and to get in the channels registered, but it did not work.
alias list_ini {
var %a = 1
var %b = $ini(scripts\autojoin.ini,0)
while (%a <= %b) {
var %c = 1
while ($ini(scripts\autojoin.ini,%a,%c) != $null) {
while ($ini(scripts\autojoin.ini,$ini(scripts\autojoin.ini,%a),%c) != $null) {
did -a autojoin 3 0 1 $ini(scripts\autojoin.ini,$ini(scripts\autojoin.ini,%a),%c) $chr(9) $ini(scripts\autojoin.ini,%a) $chr(9) $readini(scripts\autojoin.ini,$ini(scripts\autojoin.ini,1),$v1)
inc %c
}
inc %a
}
}
on *:dialog:autojoin:init:*:{
dll $shortfn($mircdir\scripts\dlls\mdx.dll) SetMircVersion $version
dll $shortfn($mircdir\scripts\dlls\mdx.dll) MarkDialog $dname
dll $shortfn($mircdir\scripts\dlls\mdx.dll) SetFont $dname 4,5,15 +a 13 560 verdana
dll $shortfn($mircdir\scripts\dlls\mdx.dll) SetFont 12,13 ANSI 13 700 Tahoma
dll $shortfn($mircdir\scripts\dlls\mdx.dll) SetControlMDX $dname 3 listview rowselect icon grid showsel single labeltipo headerdrag report sortascending flatsb nosortheader > $views
did -i $dname 3 1 seticon list 0,scripts\icones\baloes.ico
did -i $dname 3 1 headerdims 120 120 120
did -i $dname 3 1 headertext Canal: $chr(9) Rede: $chr(9) Senha:
if (%autojoin.stat == on) { did -c $dname 10 }
if (%autojoin.aid == on) { did -c $dname 11 }
did -ra $dname 2 $chr(35)
list_ini
if (%anima_dialog == on) { cwnd $dialog($dname).hwnd }
}
on *:dialog:autojoin:sclick:4:{
if (($did(14).text == $null)) {
return $input(É necessario que você coloque uma rede para adicionar o canal!,516,Erro)
halt
}
else {
if ($did(autojoin,16) == $null) {
writeini scripts\autojoin.ini $did(14) $did(2) Nenhuma
did -r $dname 2,14
did -ra $dname 2 $chr(35)
did -r $dname 3
list_ini
}
else {
writeini scripts\autojoin.ini $did(14) $did(2) $did(16)
set %conf.joinchan $addtok(%conf.joinchan,$did(2),44)
did -r $dname 2,14,16
did -ra $dname 2 $chr(35)
did -r $dname 3
list_ini
}
}
}
on *:dialog:autojoin:sclick:5:{
if ($did(3).seltext == $null) {
return $input(É necessario que você selecione um canal!,516,Erro)
halt
}
else {
remini scripts\autojoin.ini $gettok($did(autojoin,3).seltext,11,32) $gettok($did(autojoin,3).seltext,6,32)
set %conf.joinchan $remtok(%conf.joinchan,$gettok($did(autojoin,3).seltext,11,32).sel,44)
did -d $dname 3 $did(3).sel
}
}
on *:dialog:autojoin:sclick:10:{ if ($did(10).state = 1) { /set %autojoin.stat on } | if ($did(10).state = 0) { /set %autojoin.stat off } }
on *:dialog:autojoin:sclick:11:{ if ($did(11).state = 1) { /set %autojoin.aid on } | if ($did(11).state = 0) { /set %autojoin.aid off } }
If you can help me, I'll be grateful.
|
|
|
|
|