If you wanted to save the value of the box next to "Nick Name:" to the variable %dag you would use:
Code:
on *:DIALOG:config:sclick:17:{  
  set %dag $did(1)
}


Since in your dialog the edit box next to "Nick Name:" is id 1.