Are you running the application with windbg already attached, or are you JIT debugging? If the latter (i.e., you're relying on the setting in HKLM\Softare\Microsoft\Windows NT\AEDebug\Debugger), then simply modify the value of the Debugger key to use the "-c" command to run a command after the debugger attaches.
Assuming the former, then you could try starting the debugging server using a named pipe or tcp (with the .server command). You can then write a console app to start an instance of cdb as a client to connect to the aforementioned windbg server and have the app parse stdout until you see the debugger prompt. You can then effectively automate the debugging session from that point on. Thus, it gets reduced a parsing exercise, possibly wrapped in an FSM depending on how complex you want to get.