Version: 01.00.10 - last Update: Friday, October 09, 2009, 13:30:00
_EdOpenFil | _EdCloseFi | _EdRevert | _EdSelect | _EdIndent | _EdInsert | _EdDelete | _EdComment
Foxtools Editor Support Functions
_EDSENDKEY
_EdSendKey() Simulates a key press in the editor session passed in <nWHANDL>.
VFP Syntax
= _EdSendKey(nWHAND, nAsciiValue)
Parameters
[in] nWHAND
Fox-window handle of the editor session in question. If nWHANDL is no valid editor-session handle, an error “API call caused an exception” (Error 2028) is raised.
[in] nAsciiValue
The ASCII value of the character to be sent as a key press.
Returns
VOID - no evaluable return value, coz always TRUE.
Remarks
The character is inserted at the current caret position. One can send control character values, too! Thus, sending a CR or Tab stop is possible as well.
VFP Example(s)
Opening an editor session, selecting a block of text:
*\\ Open editor session nWHAND =_EDOPENFIL("TEST.TXT", 1) *\\ Send “Hello World!” to editor ? _EDSENDKEY(m.nWHAND, ASC("H")) ? _EDSENDKEY(m.nWHAND, ASC("e")) ? _EDSENDKEY(m.nWHAND, ASC("l")) ? _EDSENDKEY(m.nWHAND, ASC("l")) ? _EDSENDKEY(m.nWHAND, ASC("o")) ? _EDSENDKEY(m.nWHAND, ASC(" ")) ? _EDSENDKEY(m.nWHAND, ASC("W")) ? _EDSENDKEY(m.nWHAND, ASC("o")) ? _EDSENDKEY(m.nWHAND, ASC("r")) ? _EDSENDKEY(m.nWHAND, ASC("l")) ? _EDSENDKEY(m.nWHAND, ASC("d")) ? _EDSENDKEY(m.nWHAND, ASC("!"))