Thanks Henrik :D
I got it working, and I just released an update.
Here's a cut&paste from my source.
Basically, it all boils down to this:
Result=RunProgram( encoderFilePath$, " CQMatic.tpr /Encode /Close",".", 2)
; Wait until program appears.
Repeat
Delay(10)
hwnd = FindWindow_(0,"TMPGEnc ...