Thanks-- this worked great, and I wrote my little hook. This will speed my code generation by far-- now I can use variables that fully describe what they do, and not have to type them all out every time i use them-- just a little CTRL+SPACEBAR after I have typed the first few unique characters. I never realized I used it so much in VC++... :-)
>There are some functions in the FoxTools.FLL you can call that can give you access to the code. Here's some sample code that will return all of the code in the currently open window:
>
>
>FUNCTION GetFullCode()
>
>LOCAL lcProgram, ;
> lnHwd, ;
> laEnv, ;
> lnPos
>
>SET LIBRARY TO SYS(2004) + "FOXTOOLS.FLL"
>lnHwd = _WONTOP()
>DIMENSION laEnv[25]
>
>_edGetEnv(lnHwd, @laEnv)
>
>lcProgram = ""
>lnPos = 0
>
>DO WHILE lnPos <= laEnv[2]
> lcProgram = lcProgram + _EDGETCHAR(lnHwd, lnPos)
> lnPos = lnPos + 1
>ENDDO
>
>RETURN lcProgram
>
>
>If you do a search for the various underscored-named functions, you should be able to find more examples.
Derek J. Kalweit
Software Engineer
Microworks POS Solutions, Inc.