on *:DIALOG:phmawaypref:sclick:4:{
set %var $did(4)
}

This is all in the helpfile..