Copy Command Window Selected Text to Clipboard Programmatically
By Sergey - Posted on January 1st, 2008
The code uses Editor functions from Foxtools.fll. See George Tasker's Extended Foxtools Help Download #9333 on UT for more info.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
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 )
Recent comments
1 week 23 hours ago
2 weeks 1 day ago
3 weeks 2 days ago
3 weeks 3 days ago
3 weeks 5 days ago
3 weeks 6 days ago
4 weeks 4 days ago
4 weeks 4 days ago
4 weeks 5 days ago
4 weeks 5 days ago