mIRC Home    About    Download    Register    News    Help

Print Thread
#105692 19/12/04 03:32 PM
Joined: Nov 2004
Posts: 84
GogetaX Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2004
Posts: 84
how can i set the check box clicked when i open in dialog?


by the time you finish reading this, you realize you have wasted 5 secundes of your life!
#105693 19/12/04 04:23 PM
Joined: Aug 2004
Posts: 16
I
Pikka bird
Offline
Pikka bird
I
Joined: Aug 2004
Posts: 16
Hi.

Let's say your dialog is called "test" and your check box has the ID 1:
Code:
on 1:DIALOG:test:init:*:{ did -c $dname 1 }

This checks your checkbox "1" just before the dialog "test" is displayed.

Kathy

Last edited by inti; 19/12/04 04:25 PM.

Regards,
KathY
#105694 19/12/04 04:36 PM
Joined: Nov 2004
Posts: 84
GogetaX Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2004
Posts: 84
and little more explaining...? smile)
where do i need to put this code when i have something like this:
Code:
dialog Login {
  size 324 188 243 253
  title "Login"
  button "", 24, 0 0 0 0, cancel
  check "Auto Login To NickServ", 14, 10 184 130 17
}

the CHECK Box..
when i loding this dialog, it will remember last check (if it was checked last time)


by the time you finish reading this, you realize you have wasted 5 secundes of your life!
#105695 19/12/04 05:26 PM
Joined: Aug 2004
Posts: 16
I
Pikka bird
Offline
Pikka bird
I
Joined: Aug 2004
Posts: 16
Hi.

You put this code wherever you want. wink
This is an event, it's practical to put it under your dialog table.

on 1:DIALOG:login:close:*:{
if ($did(14).state == 1) { set %login.check 1 }
else { unset %login.check }
}


When you close this dialog, it'll set %login.check 1 if the checkboxs is checked. Else it'll unset %login.check.

on 1:DIALOG:login:init:*:{
if (%login.check) { did -c $dname 14 }
}


This code will check the checkbox if it has been checked last time.

I hope that I've understood you right.


Regards,
KathY
#105696 20/12/04 02:24 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Just a wee bit simpler, leaves %login.check always set to either 0 or 1.
Code:
on *:dialog:login:close:*:{
  set %login.check $did(14).state
}


Link Copied to Clipboard