I think waiting in the precompiler or in a script for presence of the output file will be no real help because the output file will appear in the file system immdiately after opening the file in your compiler before any data is written into this file. So you would have the problem that you either could not access the file because the compiler writes to it now or you just get a snapshot of the first few data written into the output file.
You have to wait for the termination of the compiler before you can evaluate the output. I suggest to write a batch file which runs first your precompiler and then the compiler and last types the output file which could be captured by UltraEdit to the output window. For example the batch file could look like this:
start "PreCompiler" /wait "c:\program files\...\Myprecompiler.exe" "%1"
start "Compiler" /wait "c:\program files\...\Compiler.exe" "file created by the precompiler"
type "name of the compiler output file"
start is an internal command (embedded in cmd.exe of Windows NT4 and later) to run a Windows GUI application from a command shell and most often used with the /wait parameter to wait for the termination of the Windows GUI application before continueing the batch file.
Also possible would be to run the precompiler in the batch file as shown above and then use Windows command Find together with command tasklist or tlist (depending on your version of Windows) in a loop to wait for the termination of the compiler. When the precompiler has terminated, the find command is executed on the list created by tasklist or tlist to search for the name of the compiler in the list of running tasks. If found the batch file should wait 1-3 seconds and then run the check for the compiler application in the task list again. When the compiler application name cannot be found anymore in the Windows tasklist, the batch file can continue with typing the compiler output file which is then captured by UltraEdit to the output window.
By the way: Why does the compiler not write to stdout or stderr as compilers normally do?
Best regards from Austria