|
Joined: Jan 2006
Posts: 2
Bowl of petunias
|
OP
Bowl of petunias
Joined: Jan 2006
Posts: 2 |
i am tryin to make a dialog with tabs for jokes n poems but i dont know how to get the second tab to work properly. can somebody help me? Script: - dialog Chistes { title "Chistes Mamones R£VELÍØN" size -1 -1 300 285 tab "Chistes", 10, 0 0 300 290 tab "Poemas", 111, 0 0 300 290 ;chistes box "",1,13 21 270 70, tab 10 text "Chiste Nº",2,28 105 55 25, tab 10 list 3,83 105 50 40, tab 10 edit "",4,23 145 250 100,multi read vsbar, tab 10 button "Decir",5,50 258 40 25,defaul, tab 10 button "Cerrar",6,220 258 40 25,ok, box "",7,13 87 270 170, tab 10 text "Chistes sobre: ",8,63 39 100 25, tab 10 list 9,143 39 100 40, tab 10 ;Poemas box "",100,13 21 270 70, tab 111 text "Tipo De Poema: ",101,63 39 100 25, tab 111 list 102,143 39 100 40, tab 111 box "",103,13 87 270 170, tab 111 text "Poema #",104,28 105 55 25, tab 111 list 105,83 105 50 40, tab 111 edit "",106,23 145 250 100,multi read vsbar, tab 111 button "Decir",107,50 258 40 25,defaul, tab 111 }
on 1:dialog:Chistes:INIT:0:{ chis } on 1:dialog:chistes:SCLICK:3: { did -r chistes 4 | did -i chistes 4 1 $read -l $did(chistes,3).sel %TextoChiste } on 1:dialog:chistes:SCLICK:5: { DecirChiste $did(chistes,3).sel } on 1:dialog:chistes:SCLICK:9: { ChisteSobre $did(chistes,9).sel } on 1:dialog:chistes:SCLICK:111:{ chis } on 1:dialog:chistes:SCLICK:105: { did -r chistes 4 | did -i chistes 4 1 $read -l $did(chistes,3).sel %TextoChiste } on 1:dialog:chistes:SCLICK:107: { DecirChiste $did(chistes,3).sel } on 1:dialog:chistes:SCLICK:102: { ChisteSobre $did(chistes,9).sel }
Aliases: /Chistes { dialog -m Chistes Chistes | set %CanalChiste $1 }
/chis {
did -i chistes 9 1 Machistas did -i chistes 9 2 Feministas did -i chistes 9 3 Que le dijo did -i chistes 9 4 Borrachos did -i chistes 9 5 No es lo mismo did -i chistes 9 6 Mamá mamá!!! did -i chistes 9 7 Pepito did -i chistes 9 8 Verdes did -i chistes 9 9 Definiciones did -i chistes 9 10 Mal gusto did -c chistes 9 1 ChisteSobre 1 }
/ChisteSobre { did -r chistes 4 did -r chistes 3 if ($1 == 1) { set %TextoChiste $mircdirchistes\machistas.txt } if ($1 == 2) { set %TextoChiste $mircdirchistes\feministas.txt } if ($1 == 3) { set %TextoChiste $mircdirchistes\queledijo.txt } if ($1 == 4) { set %TextoChiste $mircdirchistes\borrachos.txt } if ($1 == 5) { set %TextoChiste $mircdirchistes\nem.txt } if ($1 == 6) { set %TextoChiste $mircdirchistes\mama.txt } if ($1 == 7) { set %TextoChiste $mircdirchistes\pepito.txt } if ($1 == 8) { set %TextoChiste $mircdirchistes\verdes.txt } if ($1 == 9) { set %TextoChiste $mircdirchistes\definiciones.txt } if ($1 == 10) { set %TextoChiste $mircdirchistes\Malgusto.txt } set %cont1Chistes 0 :start inc %cont1Chistes if ($read -l %cont1Chistes %TextoChiste != $null) { did -i chistes 3 %cont1Chistes %cont1Chistes | goto start } else { unset %cont1Chistes | did -c chistes 3 1 | did -i chistes 4 1 $read -l 1 %TextoChiste | halt } }
DecirChiste { msg %CanalChiste 10,1 $read -l $1 %TextoChiste %ver }
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
aliases in mIRC remotes/MRCs must be prefixed literally "alias"
alias tabtest dialog -m Chistes Chistes
dialog Chistes {
title "Chistes Mamones R£VELÍØN"
size -1 -1 300 285
tab "Chistes", 10, 0 0 300 290
tab "Poemas", 111, 0 0 300 290
;chistes
box "",1,13 21 270 70, tab 10
text "Chiste Nº",2,28 105 55 25, tab 10
list 3,83 105 50 40, tab 10
edit "",4,23 145 250 100,multi read vsbar, tab 10
button "Decir",5,50 258 40 25,defaul, tab 10
button "Cerrar",6,220 258 40 25,ok,
box "",7,13 87 270 170, tab 10
text "Chistes sobre: ",8,63 39 100 25, tab 10
list 9,143 39 100 40, tab 10
;Poemas
box "",100,13 21 270 70, tab 111
text "Tipo De Poema: ",101,63 39 100 25, tab 111
list 102,143 39 100 40, tab 111
box "",103,13 87 270 170, tab 111
text "Poema #",104,28 105 55 25, tab 111
list 105,83 105 50 40, tab 111
edit "",106,23 145 250 100,multi read vsbar, tab 111
button "Decir",107,50 258 40 25,defaul, tab 111
}
on 1:dialog:Chistes:INIT:0:{ chis }
on 1:dialog:chistes:SCLICK:3: { did -r chistes 4 | did -i chistes 4 1 $read -l $did(chistes,3).sel %TextoChiste }
on 1:dialog:chistes:SCLICK:5: { DecirChiste $did(chistes,3).sel }
on 1:dialog:chistes:SCLICK:9: { ChisteSobre $did(chistes,9).sel }
on 1:dialog:chistes:SCLICK:111:{ chis }
on 1:dialog:chistes:SCLICK:105: { did -r chistes 4 | did -i chistes 4 1 $read -l $did(chistes,3).sel %TextoChiste }
on 1:dialog:chistes:SCLICK:107: { DecirChiste $did(chistes,3).sel }
on 1:dialog:chistes:SCLICK:102: { ChisteSobre $did(chistes,9).sel }
Aliases:
alias Chistes { dialog -m Chistes Chistes | set %CanalChiste $1 }
alias chis {
did -i chistes 9 1 Machistas
did -i chistes 9 2 Feministas
did -i chistes 9 3 Que le dijo
did -i chistes 9 4 Borrachos
did -i chistes 9 5 No es lo mismo
did -i chistes 9 6 Mamá mamá!!!
did -i chistes 9 7 Pepito
did -i chistes 9 8 Verdes
did -i chistes 9 9 Definiciones
did -i chistes 9 10 Mal gusto
did -c chistes 9 1
ChisteSobre 1
}
alias ChisteSobre {
did -r chistes 4
did -r chistes 3
if ($1 == 1) { set %TextoChiste $mircdirchistes\machistas.txt }
if ($1 == 2) { set %TextoChiste $mircdirchistes\feministas.txt }
if ($1 == 3) { set %TextoChiste $mircdirchistes\queledijo.txt }
if ($1 == 4) { set %TextoChiste $mircdirchistes\borrachos.txt }
if ($1 == 5) { set %TextoChiste $mircdirchistes\nem.txt }
if ($1 == 6) { set %TextoChiste $mircdirchistes\mama.txt }
if ($1 == 7) { set %TextoChiste $mircdirchistes\pepito.txt }
if ($1 == 8) { set %TextoChiste $mircdirchistes\verdes.txt }
if ($1 == 9) { set %TextoChiste $mircdirchistes\definiciones.txt }
if ($1 == 10) { set %TextoChiste $mircdirchistes\Malgusto.txt }
set %cont1Chistes 0
:start
inc %cont1Chistes
if ($read -l %cont1Chistes %TextoChiste != $null) { did -i chistes 3 %cont1Chistes %cont1Chistes | goto start }
else { unset %cont1Chistes | did -c chistes 3 1 | did -i chistes 4 1 $read -l 1 %TextoChiste | halt }
}
alias DecirChiste {
msg %CanalChiste 10,1 $read -l $1 %TextoChiste %ver
}
while I had none of the files to test this further, I think that is a place to start looking.
|
|
|
|
Joined: Dec 2005
Posts: 4
Self-satisified door
|
Self-satisified door
Joined: Dec 2005
Posts: 4 |
The first tab works properly it is the second that i can not get to work the second one is supposed to look almost alike as the first.
|
|
|
|
Joined: Dec 2005
Posts: 4
Self-satisified door
|
Self-satisified door
Joined: Dec 2005
Posts: 4 |
the aliases i provided i put them in the alias part not the remotes and so the code mikechat gave me didn't do much it gave me the same thing as before. i still can't get the second tab to work properly
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
trying to sort it out starting with the table alias tabtest dialog -m Chistes Chistes dialog Chistes { title "Chistes Mamones R£VELÍØN" size -1 -1 300 285 option pixels tab "Chistes", 10, 0 0 300 290 box "", 1, 13 21 270 70, tab 10 box "", 7, 13 87 270 170, tab 10 text "Chiste Nº", 2, 28 105 55 25, tab 10 text "Chistes sobre: ", 8, 63 39 100 25, tab 10 list 3, 83 105 50 40, tab 10 list 9, 143 39 100 40, tab 10 edit "", 4, 23 145 250 100, multi read vsbar tab 10 button "Decir", 5, 50 258 40 25, tab 10 button "Cerrar", 6, 220 258 40 25, ok ; tab "Poemas", 111, 0 0 300 290 box "", 100, 13 21 270 70, tab 111 box "", 103, 13 87 270 170, tab 111 text "Tipo De Poema: ", 101, 63 39 100 25, tab 111 text "Poema #", 104, 28 105 55 25, tab 111 list 102, 143 39 100 40, tab 111 list 105, 83 105 50 40, tab 111 edit "", 106, 23 145 250 100, multi read vsbar tab 111 button "Decir", 107, 50 258 40 25, tab 111 } [/code] cleaned it a bit.
for size, you really should specify either option dbu or option pixel if you are sharing the script then you should choose option dbu as it will then "look right" in different resolutions
use a numbering system of some sort so its easier to track changes and errors
it can help to keep the parts of a table sorted, so all buttons are together, text is together and so on, makes it easier to find things for editing later. keeping it in sections such as tabs is fine (I like it that way) but in this case to compare the two tabs it was hard as you had the parts in different orders and no numbering system.
you mis-spelled default, and tried to have two buttons be the default, you can only have one default. consider using did -f instead:
on 1:dialog:Chistes:init:0:{ did -f Chistes 5 }
on 1:dialog:Chistes:sclick:10:{ did -f Chistes 5 }
on 1:dialog:Chistes:sclick:111:{ did -f Chistes 107 }
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
the aliases i provided i put them in the alias part not the remotes and so the code mikechat gave me didn't do much it gave me the same thing as before. i still can't get the second tab to work properly maybe you can say what it is doing Wrong? or not doing Right, to say its not working doesn't help .
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
looking at some code, you have on 1:dialog:Chistes:INIT:0:{ chis } on 1:dialog:chistes:SCLICK:111:{ chis } but the alias chis only works on the ID 9 alias chis { did -i chistes 9 1 Machistas did -i chistes 9 2 Feministas did -i chistes 9 3 Que le dijo did -i chistes 9 4 Borrachos did -i chistes 9 5 No es lo mismo did -i chistes 9 6 Mamá mamá!!! did -i chistes 9 7 Pepito did -i chistes 9 8 Verdes did -i chistes 9 9 Definiciones did -i chistes 9 10 Mal gusto did -c chistes 9 1 ChisteSobre 1 } so these changes might do what you want
on 1:dialog:Chistes:INIT:0:{ set %chis_id 9 | chis | did -f Chistes 5 }
on 1:dialog:chistes:SCLICK:3: { did -r chistes 4 | did -i chistes 4 1 $read -l $did(chistes,3).sel %TextoChiste }
on 1:dialog:chistes:SCLICK:5: { DecirChiste $did(chistes,3).sel }
on 1:dialog:chistes:SCLICK:9: { ChisteSobre $did(chistes,9).sel }
on 1:dialog:chistes:SCLICK:111:{ set %chis_id 102 | chis | did -f Chistes 107 }
on 1:dialog:chistes:SCLICK:105: { did -r chistes 4 | did -i chistes 4 1 $read -l $did(chistes,3).sel %TextoChiste }
on 1:dialog:chistes:SCLICK:107: { DecirChiste $did(chistes,3).sel }
on 1:dialog:chistes:SCLICK:102: { ChisteSobre $did(chistes,9).sel }
Aliases:
alias Chistes { dialog -m Chistes Chistes | set %CanalChiste $1 }
alias chis {
did -i chistes %chis_id 1 Machistas
did -i chistes %chis_id 2 Feministas
did -i chistes %chis_id 3 Que le dijo
did -i chistes %chis_id 4 Borrachos
did -i chistes %chis_id 5 No es lo mismo
did -i chistes %chis_id 6 Mamá mamá!!!
did -i chistes %chis_id 7 Pepito
did -i chistes %chis_id 8 Verdes
did -i chistes %chis_id 9 Definiciones
did -i chistes %chis_id 10 Mal gusto
did -c chistes %chis_id 1
ChisteSobre 1
}
|
|
|
|
Joined: Jan 2006
Posts: 2
Bowl of petunias
|
OP
Bowl of petunias
Joined: Jan 2006
Posts: 2 |
I am sorry about not specifying what wasn't working. My whole main goal for this was to have a jokes/poems dialog where you could read the joke/ poem you like and then you press the button "decir" and it says it in the current channel. For the first tab "jokes" i could read the joke types, joke number, and actual joke and it could be said into the channel. For the second tab "poem" is where the problem came in because all of the fields (list, edit) were blank. I can not get the second tab to show the files.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
you called the same alias for the poems as the jokes and that was all you posted, I dont know how you have these things sorted or stored and without that info I don't know I can help further.
did you read the changes I put in the other posts to this thread?
|
|
|
|
Joined: Dec 2005
Posts: 4
Self-satisified door
|
Self-satisified door
Joined: Dec 2005
Posts: 4 |
yes the second set helped very much thank you very much for the help!!!
|
|
|
|
|