mIRC Home    About    Download    Register    News    Help

Print Thread
#272781 11/07/24 08:06 AM
Joined: Apr 2005
Posts: 122
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 122
dialog xsys {
title "New Project"
size -1 -1 409 125
option dbu
box "", 1, 5 4 399 120
button "Button", 2, 71 110 37 12, flat
list 3, 9 13 392 94, size
edit "", 5, 59 111 11 10
edit "", 6, 46 111 11 10
edit "", 7, 33 111 11 10
edit "", 8, 21 111 11 10
edit "", 9, 9 111 11 10
check "Check Box", 4, 116 110 62 10
}

on *:dialog:xsys:sclick:4:{
if $did($dname,4)=1 { .echo -a 065 activado | info }
else { .echo -a 061 Desactivado } ----- wrong and error help
}

XGamerAMD #272782 11/07/24 05:00 PM
Joined: Jan 2012
Posts: 323
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 323
🕮 ? Quest - Check the help documentation.

Study this information carefully to find the right solution to your problem:



Hint: The answer lies somewhere on the surface and is hid between the lines of the help documentation.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
XGamerAMD #272784 12/07/24 06:51 AM
Joined: Dec 2002
Posts: 5,486
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,486
The property you are looking for is ".state" which returns the state of the checkbox:

Code
on *:dialog:xsys:sclick:4:{
  if ($did($dname,4).state == 1) { .echo -a 065 Activado }
  else { .echo -a 061 Desactivado }
}
Other observations:
You should have brackets () around the if statement comparison, followed by { } for the commands it triggers.
The "==" should have spaces around it to separate it from all other parts of the comparison text.


Link Copied to Clipboard