Hi all,
basically, I have to agree that corrupt’s cmdret is extremely helpful. However, I’ve some problems with this tool and wonder if someone can point me in the right direction.
I’m trying to compile a C/C++ project using a PERL script (see CompileCmd below) and redirect its output to a GUI edit window within a tab control. Both versions (one using CMDret.exe and one using the cmdret.dll) basically work, that is, the output shows up in the edit control but with
version 1 (CMDret.exe)
- close to the end of the compile process the output just stops, no compiler output files are created - seems to me that the process just dies at some stage (the PERL script runs ok in a DOS box)
version 2 (cmdret.dll)
- everything works ok with regard to the compile process but the output window is not refreshed at some point - just the grey output window without the edit or tab control can be seen. Once the compile process completed, I can click on the output window to re-display the controls as well as the compiler output.
- one additional question: Is it somehow possible to get the PID of the CMD process as in the CMDret.exe version?
Version 1 using CMDret.exe:
Code:
GuiControl, 2:Choose, OutputTab, 2
SetTimer, SubOutputCompile, 250
RunWait, %RunCMD1% "p=" "%comspec% /c cd /d %vProjectFolder% && date/t && time /t && %CompileCmd% && date/t && time /t", , hide, CompilePID
SetTimer, RefOutputCompile, Off
Gosub, SubOutputCompile
Version 2 using cmdret.dll:
Code:
CMD = %comspec% /c cd /d %vProjectFolder% && %CompileCmd% && echo.
OutputWindow := WinExist("Output Window")
GuiControl, 2:Choose, OutputTab, 2
StrOut := DllCall("cmdret.dll\RunInControl", "str", CMD, "Uint", OutputWindow, "str", "Edit", "int", "2")
Thanks