TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
SET &EM_GETSEL=0x00B0
SET &EM_SETSEL=0x00B1
WIN1

_SUB WIN1,W287H139,新窗口1,
    EDIT -3D -vcenter EDIT1,L69T31W194H30,123,
    ITEM -na ITEM1,L8T30W45H30,ITEM1,TEAM STRL  &&L=%EDIT1%a| ENVI @EDIT1=%EDIT1%ab| SetPos EDIT1 %L%
_END


// SetPos  EditName PosStart [PosEnd]
_SUB SetPos
    SET &d2=%~3
    FIND $%&d2%=, SET &d2=%~2
    ENVI @%1.POSTMSG=%EM_SETSEL%,%~2,%d2%
_END
