This may work:
1. Open one of the esps you want to patch in the CS. It doesn't really matter which one.
2. Make your script changes and add the variables from the other mod.
3. Repeat fro the other mod.
4. Open your new esps along with the other esp with TES4Edit.
5. Once the files have loaded, right click in the file list area and select create merged patch.
You should now have a file that contains the changes you made to both esps.
6. Right click on each record and select Change FormID. Change them all to an index for the new esp. (You do not want them to have the same index as the esps to be patched yet.)
7. Right click on the file header and remove the two esps you just created as masters.
8. Close TES4edit.
9. Open it back up, load your newest esp. The esps you want to patch should load too if you've created the merged patch correctly.
10. Now right click on each record and change its formid to match the esp it came from.
That should do the trick.