Sorry, I only copied the last line of code. 
Your code is correct
@kevin
Thank you very much for your help. These details made me understand a lot of things.
error
,_s.getsel
,str s1.from("$inp_" _s "$")
,;s1.setsel ;;BUG
,s1.setsel(0 id(3 hDlg))
correct
,_s.getsel(0 0 id(3 hDlg))
,str s1.from("$inp_" _s "$")
,s1.setsel(0 id(3 hDlg))

Your code is correct
@kevin
Thank you very much for your help. These details made me understand a lot of things.
error
,_s.getsel
,str s1.from("$inp_" _s "$")
,;s1.setsel ;;BUG
,s1.setsel(0 id(3 hDlg))
correct
,_s.getsel(0 0 id(3 hDlg))
,str s1.from("$inp_" _s "$")
,s1.setsel(0 id(3 hDlg))