Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selected text from command window
Message
 
 
To
01/05/2004 10:34:21
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00900030
Message ID:
00900059
Views:
45
This message has been marked as the solution to the initial question of the thread.
>Hi All
>
>Is there a way to have a program get the selected text from a command window?
>
Hi James,

You can use FoxTools to access the command window. Here's the basic code that should get you started. See George's Extended Foxtools Help File #9333 for more info.
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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform