by Mofi » Tue Mar 28, 2006 6:47 am
Yes, with a user tool. But you should do everything with a single batch file. Then you don't need to open a command prompt with /k and run the batch files manually. Example:
You have a batch file named "CompileFortran.bat" which has 2 parameters. The first one is the name of the file which should be compiled and the second one is the compiler which should be used. So the command line in the user tool of UltraEdit looks for example as follows:
CompileFortran.bat "%f" Intel7
The batch file CompileFortran.bat looks at follows:
@echo off
if not exist "%1" goto FileNotExist
if "%2"=="Intel7" goto Intel7
if "%2"=="Fortran2" goto Fortran2
if "%2"=="Fortran3" goto Fortran3
echo "%2" is not specified or an unknown parameter!!!
goto EndBatch
:FileNotExist
echo File "%1" does not exist!!!
goto EndBatch
:Intel7
call ifcvars.bat
call fscan "%1"
goto EndBatch
:Fortran2
rem call whatever needed for Fortran compiler 2
goto EndBatch
:Fortran3
rem call whatever needed for Fortran compiler 3
goto EndBatch
:EndBatch
pause
--------------------- end of batch file
Remove the pause command at the end of the batch file if you capture the output with UltraEdit.