diff --git a/Convert_VFP9_BIN_2_PRG.vbs b/Convert_VFP9_BIN_2_PRG.vbs index b09d990..47cc1f5 100644 --- a/Convert_VFP9_BIN_2_PRG.vbs +++ b/Convert_VFP9_BIN_2_PRG.vbs @@ -1,5 +1,6 @@ '--------------------------------------------------------------------------------------------------- -' Convert_VFP9_BIN_2_PRG.vbs - 03/01/2014 - Fernando D. Bozzo (fdbozzo@gmail.com) +' Convert_VFP9_BIN_2_PRG.vbs (VFPx: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg) +' 03/01/2014 - Fernando D. Bozzo (fdbozzo@gmail.com - Blog: http://fdbozzo.blogspot.com.es/) '--------------------------------------------------------------------------------------------------- ' ENGLISH: ' - Copy this file in the same directory of FoxBin2prg and create a shortcut diff --git a/Convert_VFP9_PRG_2_BIN.vbs b/Convert_VFP9_PRG_2_BIN.vbs index b284ab0..3f00172 100644 --- a/Convert_VFP9_PRG_2_BIN.vbs +++ b/Convert_VFP9_PRG_2_BIN.vbs @@ -1,5 +1,6 @@ '--------------------------------------------------------------------------------------------------- -' Convert_VFP9_PRG_2_BIN.vbs - 03/01/2014 - Fernando D. Bozzo (fdbozzo@gmail.com) +' Convert_VFP9_PRG_2_BIN.vbs (VFPx: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg) +' 03/01/2014 - Fernando D. Bozzo (fdbozzo@gmail.com - Blog: http://fdbozzo.blogspot.com.es/) '--------------------------------------------------------------------------------------------------- ' ENGLISH: ' - Copy this file in the same directory of FoxBin2prg and create a shortcut diff --git a/FoxBin2PRGVersionFile.txt b/FoxBin2PRGVersionFile.txt index 71def4e..0526886 100644 --- a/FoxBin2PRGVersionFile.txt +++ b/FoxBin2PRGVersionFile.txt @@ -2,8 +2,8 @@ Lparameters toUpdateInfo Local lcNote With toUpdateInfo - .VersionNumber = 'v1.19.35' - .VersionDate = Date(2014,09,26) + .VersionNumber = 'v1.19.36' + .VersionDate = Date(2014,10,08) .SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip' .Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG' @@ -17,6 +17,10 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- +2014/10/08 v1.19.36 +- Bug fix mnx: When generating mn2 text view, menu all pad IDs are generated as _000000000 (bug introduced in v1.19.36) +- Enhancement: New "VFP9_FoxBin2Prg.vbs" script for "SendTo" menu, that replaces FoxBin2Prg.exe in this menu and adds a process status message + 2014/09/26 v1.19.35 - Enhancement: Always generate the same Timestamp and UniqueID for binaries, for minimizing differences when regenerating them (Marcio Gomez G.) diff --git a/Normalize_FileNames.vbs b/Normalize_FileNames.vbs index f14c7f9..7162027 100644 --- a/Normalize_FileNames.vbs +++ b/Normalize_FileNames.vbs @@ -1,5 +1,6 @@ '--------------------------------------------------------------------------------------------------- -' Normalize_FileNames.vbs - 06/01/2014 - Fernando D. Bozzo (fdbozzo@gmail.com) +' Normalize_FileNames.vbs (VFPx: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg) +' 06/01/2014 - Fernando D. Bozzo (fdbozzo@gmail.com - Blog: http://fdbozzo.blogspot.com.es/) '--------------------------------------------------------------------------------------------------- ' ENGLISH: ' Create a shortcut on user's "SendTo" folder and configure CAPS on filename_caps.cfg diff --git a/README.txt b/README.txt index 7fdc564..2ca91ef 100644 --- a/README.txt +++ b/README.txt @@ -35,8 +35,9 @@ DO FOXBIN2PRG.PRG WITH "\archivo.scx" ==> Generates the TEXT version sc2 DO FOXBIN2PRG.PRG WITH "\archivo.sc2" ==> Regenerates the binary version with scx extension USEFUL TRICK: -You can create a shortcut in the "SendTo" folder on your user Windows Profile, so you can "send" -the selected file (pjx,pj2,etc) to Foxbin2prg.exe, and make on-the-fly conversions. +You can create shortcuts for all vbs scripts in the "SendTo" folder on your user Windows Profile, so you can "send" +the selected file (pjx,pj2,etc) to the selected script, and make on-the-fly conversions. +In example: Select a file, right-click, SendTo -> VFP9_FoxBin2Prg.vbs LOCALIZATION: If file [foxbin2prg.h] is created, texts to other languages can be translated. En example @@ -87,8 +88,9 @@ DO FOXBIN2PRG.PRG WITH "\archivo.scx" ==> Genera la versión TEXTO con ex DO FOXBIN2PRG.PRG WITH "\archivo.sc2" ==> Regenera la versión binaria con extensión scx TRUCO UTIL: -Se puede crear un acceso directo en la carpeta "SendTo" del perfil del usuario, para poder "enviar" -el archivo elegido (pjx,pj2,etc) a Foxbin2prg.exe, y así se hacen conversiones al vuelo. +Se puede crear accesos directos de todos los scripts vbs en la carpeta "SendTo" del perfil del usuario, para poder "enviar" +el archivo elegido (pjx,pj2,etc) al script seleccionado, y así hacer conversiones al vuelo. +Por ejemplo: Seleccionar un archivo, click-derecho, Enviar A -> VFP9_FoxBin2Prg.vbs LOCALIZACIÓN: Si se crea un archivo [foxbin2prg.h], se pueden trasladar los textos a otros idiomas. Se adjunta diff --git a/VFP9_FoxBin2Prg.vbs b/VFP9_FoxBin2Prg.vbs new file mode 100644 index 0000000..82340e9 --- /dev/null +++ b/VFP9_FoxBin2Prg.vbs @@ -0,0 +1,123 @@ +'--------------------------------------------------------------------------------------------------- +' VFP9_FoxBin2Prg.vbs (VFPx: https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg) +' 08/10/2014 - Fernando D. Bozzo (fdbozzo@gmail.com - Blog: http://fdbozzo.blogspot.com.es/) +' +'--------------------------------------------------------------------------------------------------- +' ENGLISH: +' - Copy this file in the same directory of FoxBin2prg and create a shortcut +' on user's "SendTo" folder +' - Now you can select files or directories, right click and "SendTo" FoxBin2prg for batch conversion +' +' ESPAÑOL: +' - Copie este archivo en el mismo directorio que FoxBin2prg y cree un acceso directo +' en la carpeta "SendTo" del usuario +' - Ahora puede seleccionar archivos o directorios, pulsar click derecho y "Enviar a" FoxBin2prg para conversiones batch +'--------------------------------------------------------------------------------------------------- +Dim WSHShell, FileSystemObject +Dim nExitCode, cEXETool, cEXETool2, nDebug +Set wshShell = CreateObject( "WScript.Shell" ) +Set FileSystemObject = WScript.CreateObject("Scripting.FileSystemObject") +Set oVFP9 = CreateObject("VisualFoxPro.Application.9") +nExitCode = 0 +'--------------------------------------------------------------------------------------------------- +'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 +'--------------------------------------------------------------------------------------------------- + +If WScript.Arguments.Count = 0 Then + 'SIN PARÁMETROS + nExitCode = 1 + cErrMsg = "nDebug = " & nDebug + If GetBit(nDebug, 1) Then + cErrMsg = cErrMsg & Chr(13) & "Bit 0 ON: (1) Create FoxBin2prg LOG" + End If + If GetBit(nDebug, 2) Then + cErrMsg = cErrMsg & Chr(13) & "Bit 1 ON: (2) Only show script calls" + End If + If GetBit(nDebug, 3) Then + cErrMsg = cErrMsg & Chr(13) & "Bit 2 ON: (4) Don't show FoxBin2prg error modal messages" + End If + If GetBit(nDebug, 4) Then + cErrMsg = cErrMsg & Chr(13) & "Bit 3 ON: (8) Show End of Process message" + End If + If GetBit(nDebug, 5) Then + cErrMsg = cErrMsg & Chr(13) & "Bit 4 ON: (16) Empty timestamps" + End If + MsgBox cErrMsg, 64, "No parameters - Debug Status" + +ElseIf WScript.Arguments.Count > 1 Then + MsgBox cErrMsg, 64, "You can select just ONE file with this script!" + +Else + 'CON PARÁMETROS + cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxbin2prg.exe") + nFile_Count = 0 + oVFP9.DoCmd( "SET PROCEDURE TO '" & cEXETool & "'" ) + oVFP9.DoCmd( "PUBLIC oFoxBin2prg" ) + oVFP9.DoCmd( "oFoxBin2prg = CREATEOBJECT('c_foxbin2prg')" ) + oVFP9.DoCmd( "oFoxBin2prg.EvaluarConfiguracion( '1', '1' )" ) + + cFlagGenerateLog = "'0'" + cFlagDontShowErrMsg = "'0'" + cFlagShowCall = "'0'" + cFlagRecompile = "'1'" + + If GetBit(nDebug, 1) Then + cFlagGenerateLog = "'1'" + End If + If GetBit(nDebug, 2) Then + cFlagJustShowCall = "1" + End If + If GetBit(nDebug, 3) Then + cFlagDontShowErrMsg = "'1'" + End If + If GetBit(nDebug, 5) Then + cNoTimestamps = "'1'" + End If + + cFlagRecompile = "'" & FileSystemObject.GetParentFolderName( WScript.Arguments(0) ) & "'" + + If nDebug = 0 Or nDebug = 2 Then + cCMD = "oFoxBin2prg.ejecutar( '" & WScript.Arguments(0) & "' )" + Else + cCMD = "oFoxBin2prg.ejecutar( '" & WScript.Arguments(0) & "','0','0','0'," _ + & cFlagDontShowErrMsg & "," & cFlagGenerateLog & ",'1','','',.F.,''," _ + & cFlagRecompile & "," & cNoTimestamps & " )" + End If + If cFlagJustShowCall = "1" Then + MsgBox cCMD, 64, "PARAMETERS" + Else + oVFP9.DoCmd( cCMD ) + nExitCode = oVFP9.Eval("_SCREEN.ExitCode") + End If + + If GetBit(nDebug, 4) Then + 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" ) + oVFP9.DoCmd( "CLEAR ALL" ) + Set oVFP9 = Nothing +End If + +WScript.Quit(nExitCode) + + +Function GetBit(lngValue, BitNum) + Dim BitMask + If BitNum < 32 Then BitMask = 2 ^ (BitNum - 1) Else BitMask = "&H80000000" + GetBit = CBool(lngValue AND BitMask) +End Function