From 70d196631232e86d7b72f481c31f2d3992241ab6 Mon Sep 17 00:00:00 2001 From: fdbozzo Date: Sun, 22 Jun 2014 20:08:29 +0200 Subject: [PATCH] Changeset: 323 fdbozzo - 22/06/2014 20:07:10: - Scripts vbs adaptados para mostrar los errores --- Convert_VFP9_BIN_2_PRG.vbs | 14 +++++++++++--- Convert_VFP9_PRG_2_BIN.vbs | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Convert_VFP9_BIN_2_PRG.vbs b/Convert_VFP9_BIN_2_PRG.vbs index 26a7fb0..4dcf1be 100644 --- a/Convert_VFP9_BIN_2_PRG.vbs +++ b/Convert_VFP9_BIN_2_PRG.vbs @@ -14,7 +14,7 @@ Const ForReading = 1 Dim WSHShell, FileSystemObject Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug, lcExt, foxbin2prg_cfg, aFiles(), nFile_Count -Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall, cFlagRecompile, cNoTimestamps +Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall, cFlagRecompile, cNoTimestamps, cErrFile Set WSHShell = WScript.CreateObject("WScript.Shell") Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject") Set oVFP9 = CreateObject("VisualFoxPro.Application.9") @@ -112,11 +112,19 @@ Else oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.HIDE()" ) oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance = NULL" ) - oVFP9.DoCmd( "oFoxBin2prg = NULL" ) If GetBit(nDebug, 4) Then - MsgBox "End of Process!", 64, WScript.ScriptName + If oVFP9.Eval("oFoxBin2prg.l_Error") Then + MsgBox "End of Process! (with errors)", 48, WScript.ScriptName + cErrFile = oVFP9.Eval("FORCEPATH('FoxBin2Prg.LOG',GETENV('TEMP') )") + oVFP9.DoCmd("STRTOFILE( oFoxBin2prg.c_ErrorLog, '" & cErrFile & "' )") + WSHShell.run cErrFile + Else + MsgBox "End of Process!", 64, WScript.ScriptName + End If End If + + oVFP9.DoCmd( "oFoxBin2prg = NULL" ) End If WScript.Quit(nExitCode) diff --git a/Convert_VFP9_PRG_2_BIN.vbs b/Convert_VFP9_PRG_2_BIN.vbs index 434efbf..111dbdd 100644 --- a/Convert_VFP9_PRG_2_BIN.vbs +++ b/Convert_VFP9_PRG_2_BIN.vbs @@ -14,7 +14,7 @@ Const ForReading = 1 Dim WSHShell, FileSystemObject Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug, lcExt, foxbin2prg_cfg, aFiles(), nFile_Count -Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall, cFlagRecompile, cNoTimestamps +Dim i, x, str_cfg, aConf, cErrMsg, cFlagGenerateLog, cFlagDontShowErrMsg, cFlagJustShowCall, cFlagRecompile, cNoTimestamps, cErrFile Set WSHShell = WScript.CreateObject("WScript.Shell") Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject") Set oVFP9 = CreateObject("VisualFoxPro.Application.9") @@ -119,11 +119,19 @@ Else oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance.HIDE()" ) oVFP9.DoCmd( "oFoxBin2prg.o_Frm_Avance = NULL" ) - oVFP9.DoCmd( "oFoxBin2prg = NULL" ) If GetBit(nDebug, 4) Then - MsgBox "End of Process!", 64, WScript.ScriptName + If oVFP9.Eval("oFoxBin2prg.l_Error") Then + MsgBox "End of Process! (with errors)", 48, WScript.ScriptName + cErrFile = oVFP9.Eval("FORCEPATH('FoxBin2Prg.LOG',GETENV('TEMP') )") + oVFP9.DoCmd("STRTOFILE( oFoxBin2prg.c_ErrorLog, '" & cErrFile & "' )") + WSHShell.run cErrFile + Else + MsgBox "End of Process!", 64, WScript.ScriptName + End If End If + + oVFP9.DoCmd( "oFoxBin2prg = NULL" ) End If WScript.Quit(nExitCode)