mIRC Home    About    Download    Register    News    Help

Print Thread
Dialog Checkboxes. How to 'bind' them? #128447 25/08/05 11:55 AM
Joined: Aug 2005
Posts: 31
D
Div Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2005
Posts: 31
Hi all,

Was trying to write a dialog box and wanted to have a checkbox and a button in it.

When I click the button and the checkbox is checked, a command is performed.
When I click the button and the checkbox is NOT checked, another command is performed.

How do I do that? I can get the button to work. I just can't 'bind' the checkbox to it.
Can anyone pls give me a simple example code?

Thanks in advance for all replies.

Re: Dialog Checkboxes. How to 'bind' them? #128448 25/08/05 12:15 PM
Joined: Jan 2003
Posts: 249
C
ClickHeRe Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
Code:
ON *:DIALOG:name:*:*: {

  if ( $devent == sclick ) {
 
   if ( $did == N ) ;; ID of the checkbox

    if ( $did( $dname, N ).state == 1 ) {
      echo -s checked!
    } 
    else {
      echo -s unchecked!
    }
  }
}

Re: Dialog Checkboxes. How to 'bind' them? #128449 25/08/05 02:08 PM
Joined: Aug 2005
Posts: 31
D
Div Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2005
Posts: 31
Tnx alot!

Helped me out bigtime...

Do you perhaps also know how I can put a background image on the dialog?
I know that the UPP script offers that. Hence I know its do-able. Just got no clue how smile

Re: Dialog Checkboxes. How to 'bind' them? #128450 25/08/05 02:09 PM
Joined: Jan 2003
Posts: 249
C
ClickHeRe Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
check with MDX dll

Re: Dialog Checkboxes. How to 'bind' them? #128451 25/08/05 06:39 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
look at the Icon useage in the dialog table