mIRC Homepage
Posted By: Cheech dialog checkbox - 23/12/03 02:00 AM
i am working on learning dialogs and i have made one which works pretty well but i ran into a problem i have added 2 checkboxes to the dialog but to return if they are checked isnt working i tryed using

if ($did(7) == $true) { do this ?
i looked thru the help but it doesnt seem to specify how to tell if its checked or unchecked ?

thx .
Posted By: Collective Re: dialog checkbox - 23/12/03 02:34 AM
if ( $did(7).state ) { dostuff }
Posted By: Cheech Re: dialog checkbox - 23/12/03 02:48 AM
ok that seems to work i think i can polish that but i have one more Question the help file says
You can mark a 3state checkbox as indeterminate by specifying both -cu switches.

but that doesnt seem to work it wont uncheck the box without closing the dialog ?
Posted By: Cheech Re: dialog checkbox - 23/12/03 05:19 AM
is there no way to uncheck the box without closing the dialog ? i realize i could just add a Reset Button to do it but from what i understand you should be able to check/uncheck by clicking in the box ?
Posted By: KingTomato Re: dialog checkbox - 23/12/03 05:40 AM
I believe -c and -u of the /did command will do that.
Posted By: Cheech Re: dialog checkbox - 23/12/03 05:43 AM
what i am asking is can it be done in one command ?
Code:
  
on *:dialog:happydialog:sclick:7: {
  did -cu happydialog 7 

Posted By: KingTomato Re: dialog checkbox - 23/12/03 05:58 AM
to check it
/did -c $dname <id>
to uncheck it
/did -u $dname <id>
Posted By: AdmWiggin Re: dialog checkbox - 23/12/03 06:46 PM
isnt
/did -cu dname id

to make it the half-way state?
Posted By: Cheech Re: dialog checkbox - 23/12/03 11:49 PM
thats what i am asking ? from what i read you can make a 3state checkbox ideterminate by selcting both -cu switches ?
so i want a line that if i click the box it checks it if i click it again it uchecks it but i want it all in one command not 2 seperate ones if this is not possible then pls tell me its not possible ? if it is then pls explain how it works

thank you .
Posted By: Cheech Re: dialog checkbox - 24/12/03 03:52 AM
ok i found the answer kinda ?
here

but if someone could explain why it works it would help ?

thanks

this is what i ended up with
Code:
  
on *:dialog:happydialog:sclick:7: {
  if ($did($did) == 0) { did -c happydialog 7 }
  if ($did($did) == 1) { did -u happydialog 7 }
}

© mIRC Discussion Forums