mIRC Home    About    Download    Register    News    Help

Print Thread
#64917 23/12/03 02:00 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 .

#64918 23/12/03 02:34 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
if ( $did(7).state ) { dostuff }

#64919 23/12/03 02:48 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 ?

#64920 23/12/03 05:19 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 ?

#64921 23/12/03 05:40 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I believe -c and -u of the /did command will do that.


-KingTomato
#64922 23/12/03 05:43 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
what i am asking is can it be done in one command ?
Code:
  
on *:dialog:happydialog:sclick:7: {
  did -cu happydialog 7 


#64923 23/12/03 05:58 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
to check it
/did -c $dname <id>
to uncheck it
/did -u $dname <id>


-KingTomato
#64924 23/12/03 06:46 PM
Joined: Nov 2003
Posts: 33
Ameglian cow
Offline
Ameglian cow
Joined: Nov 2003
Posts: 33
isnt
/did -cu dname id

to make it the half-way state?


--------------------
I may be insane, but I enjoy it!
#64925 23/12/03 11:49 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 .

#64926 24/12/03 03:52 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 }
}


Last edited by Cheech; 24/12/03 03:53 AM.

Link Copied to Clipboard