Code:
 on *:dialog:<dialog_name>:close:*:{
echo -a $did($dialog(<dialog_name>).result)
}
 


That should echo the word Yes in the active window when you press the button

I didn't know what you were wanting to do with that information, so I just echoed it.