Code:
on *:dialog:phmautojoin2004:dclick:4:{ set %todel99 $did($dname,4)[color:red].seltext[/color] }

that should solve your prob