//echo -a $did($dname,20).state
the -a is to echo it in the ACTIVE window, u have to use this switch in this case becuz the first switch of that /echo command is the color number and it thinks that 0/1 is the color
so u need to use that number after the switches
also $dname will work only if it's inside a dialog event, if it's not replace it with the dialog name