if $did == 1002 {
did -c $dname 2002,302 $did($did).sel
}
elseif $did == 2002 {
did -c $dname 1002,302 $did($did).sel
}
else did -c $dname 1002,2002 $did($did).sel
That works, but I've got the feeling that I'm missing an easier way of coding that. Basically the 3 ID's have the same information in them, and no matter which one is clicked, the other two have to match it.
var %ids = 1002,2002,302
if $istok(%ids,$did,44) {
did -c $dname $remtok(%ids,$did,44) $did($did).sel
}
If this is in a sclick event that fires when a listbox line is selected, you can even omit $remtok() and do a /did -c for all 3 IDs: attempting to select an already selected line simply does nothing.