err0r
Subject Matter Expert Member #20,793
I always had problems with check boxes compared to buttons & getting them to enable & stay checked if enabled can someone help fix.
on *:dialog:SpamKick:init:*: {
if (%linkclear) == on) { did -c $dname 8 }
}
on *:dialog:SpamKick:sclick:8:{
if ($did(8).state == 0) { set %linkclear Off }
elseif ($did(8).state == 1) { set %linkclear On }
}
You really do not need to declare both states
on *:dialog:SpamKick:init:*: {
if (%linkclear) == On) { did -c $dname 8 }
}
on *:dialog:SpamKick:sclick:8:{
if ($did(8).state == 1) { set %linkclear On }
else { set %linkclear Off }
}
unless you have some reason for setting an off variable i would just unset the variable to keep from cluttering up the variables area
on *:dialog:SpamKick:init:*: { $iif(%linkclear,did -c $dname 8) }
on *:dialog:SpamKick:sclick:8:{ $iif($did(8).state == 1,set %linkclear On,unset %linkclear) }
Edited Aug 13, 2009 8:48 PM by err0r
Get information about ircWx here
err0r
Subject Matter Expert Member #20,793
i just made this and it works fine
dialog SpamKick {
title "New Project"
size -1 -1 53 37
option dbu
check "test", 8, 8 17 50 10
}
on *:dialog:SpamKick:init:*: { $iif(%linkclear,did -c $dname 8) }
on *:dialog:SpamKick:sclick:8: { $iif($did(8).state == 1,set %linkclear On,unset %linkclear) }
Edited Aug 13, 2009 11:24 PM by err0r
Get information about ircWx here