I found that it's quite easy with nsDialogs to set the focus to a specific control:
${NSD_SETFOCUS} $myHWnd
But is there also a way to select all the text in that control, so that when the user starts typing, what is already there is overwritten?