LOCAL ARRAY laEnv [25] >>SET LIBRARY TO FoxTools ADDITIVE >>* Get the whandle for the current window >>lnHandle = _WonTop() >>lnResult = _EdGetEnv( lnHandle, @laEnv ) >>* [ 17 ] SelStart >>* [ 18 ] SelEnd >>* [ 25 ] Editor Session: 0 - Command Window >>IF ( lnResult = 0 ) OR; >> ( laEnv[17] = 0 ) OR ; >> ( laEnv[25] <> 0 ) >> _CLIPTEXT = "" >> RETURN >>ENDIF >> >>* Get the current cursor position >>lnSelStart = laEnv[17] >>lnSelEnd = laEnv[18] >>* Store result into clipboard >>_CLIPTEXT = _EdGetStr( lnHandle, lnSelStart, lnSelEnd ) >>RETURN