You want to multiplex them, ie. mux them together.
Using nod5's ffmpeg command line above, this command file will do every pair in a directory:
rem MuxIt.cmd <folder>
rem Put ffmpeg.exe in your PATH or edit to include full path to it
for %%a in ("*.mp4") do (
ffmpeg.exe -i "%%~a" -i "%%~na.mp3" -map 0:v -map 1:a -codec copy -shortest "%%~na-mux.mp4"
" and "te st.mp3
" will become "te st-mux.mp4
EDIT: BTW, your original AHK script probably would have worked if you'd used the AVIDemux CLI binary, (avidemux2_cli.exe) - not sure, I've always used its GUI version.