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?
Turns out it's also quite easy using the standard NSIS function
SendMessage. You can simply send the EM_SETSEL message with 0 and -1 as parameters:This will select all the text in the textbox.