FoxBin2PRG with Git?

Topics: Enhancement Request, General
Aug 19, 2014 at 8:51 PM
Has anyone worked out an integration framework for using FoxBin2PRG (or any SCCtext equivalent) with git?

I briefly looked into either using a pre-commit hook or an attribute to fire off the SCCtext generation, but it feels like a project rather than a simple script exercise. (Not the least issue is that the vbs scripts included with FoxBin2PRG don't wait for a value, and return control to their caller before the process is complete.)
Aug 20, 2014 at 6:29 AM
Hi Doug:

I don't use Git, so can't help here, but may be can help on the script side.
The script included are mean for manual use, because they show a status completion message, and because this, the scripts waits the FoxBin2Prg execution end.
If you look inside the vbs script code, you will find that FoxBin2Prg is used as an object with CreateObject.

This scripts are not mean for automation, because of the status messageboxes, but you have various choices, among others:

1) If you need the scripts, you can copy them with another name and turn off the messageboxes using the switches at the top:

'Cumulative Flags:
' 0=OFF
' 1=Create FoxBin2prg LOG
' 2=Only show script calls (for testing without executing)
' 4=Don't show FoxBin2prg error modal messages
' 8=Show end of process message
' 16=Empty timestamps
nDebug = 1+0+4+8

In this case, using 0 instead of 8 instructs to don't show the messagebox, so can call it from other scripts or EXEs

2) You can automate the FoxBin2Prg object directly, as the script does with CreateObject, and this way you have full access to internal properties and return values, among others, the oException object in case of error.

3) You can call the FoxBin2Prg EXE with parameters, and it return a DOS ERRORLEVEL you can read from any program that can read the errorlevel system variable, in example, the WScript.Shell run() method, or by other methods.

At the documentation pages in VFPx you can see all the parameters you can use, and if have any question about it, feel free to ask.

Best Regards.-