Yep what @Draco1962 said, i had to toy with sleep commands in my ahk before i found the right duration. My understanding is "wait to exit" set to yes mean, it will run that bat or ahk file completely prior to launching the emulator.
The more toys people add to these monsters the more susceptible you will be to conflicts.
I have, addressable leds, DOF Feedback, dmd ext, ultradmd, no telling what else i've forgotten, getting all of that stuff to play along together in harmony is all trial and error.
It took me a week to get PBFX3 to work with dmdext + DOFlinx (automx), there was an order and specific time i had to execute, then wait execute the next and then execute pbfx3.