Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access to the active code editor window?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00702897
Message ID:
00703769
Views:
11
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform