Combining two scripts

I work with two scripts.

First is:
And second is:

But now I need it combined. My scenes have three cameras which need to be rendered and then it has to go to the next .max file and render all three cameras there.
This should be repeated until my list from "mfrender" is finished.

I have no idea of this script things and maybe there is a script out there which can do both. It would consume too much data if I save each camera as a new scene and only use "mfrender".