Using JSL to copy the frame contents of one graph to a different graph?

I am trying to overlay the contents of two separate variability charts, using JSL. My JSL script already generates the two variability charts.

I can do the overlay manually using Copy frame contents one the 1st chart and Paste frame contents on the second chart, but I want to automate the process so the script does the overlay itself, after making the plots.

I want to do something similar but with a twist. I'm doing a Fit Generalized Model, and I want to show confidence curves on the regression graph. I can right click on the profiler and select Edit > Copy frame contents. Then I right click on the regression graph and select Edit > Paste frame contents. This is my result:

My question is: how do I do this in JSL? This is my (feeble) attempt but it doesn't work: