Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Quick Way to Use mhHTMLCode
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
A Quick Way to Use mhHTMLCode
Divers
Thread ID:
00478135
Message ID:
00478135
Vues:
57
Like many of us, I really enjoy using Mike Helland's mhHTMLCode utility, which turns ordinary VFP code into syntax-colored HTML for posting on the Web. (If you haven't discovered this yet, it's available for download here on the UT.) Mike has also provided a slick online interface for this, which you can find at http://24.14.98.235/htmlcode.asp.

There are times when I'd like to have a quick desktop interface to mhHTMLCode, though. The idea would be to allow you to copy your VFP code into the clipboard, run mhHTMLCode from the VFP Tools menu, and then paste the results back from the clipboard - quick and easy. So, here's one way to do that.

The code below assumes that mhHTMLCode is in C:\VFPTools\mhHTMLCode\. Change it to correspond to where mhHTMLCode is on your machine.

1) Place a wrapper prg (I called it mhHTMLCodeCaller.prg) in the same directory as mhHTMLCode.prg. The wrapper prg looks like this:
local lcPath
lcPath = set("path")
set path to ( lcPath) + ";c:\vfptools\mhhtmlcode\" && use your own folder name
_cliptext = mhHTMLCode( _cliptext)
set path to ( lcPath)
2) In vfpstart.prg (or whatever command file you call on VFP startup), put this code (the menu location and bar # are up to the you):
*	Mike Helland HTML Code Colorizer
DEFINE BAR 597 OF _mtools PROMPT "mhHTMLCode" BEFORE _mtl_sp200
ON SELECTION BAR 597 OF _mtools DO \VFPTools\mhHTMLCode\mhHTMLCodeCaller.prg
Hope you find it useful. And of course, thanks to Mike for making this great little utility available in the first place.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform