Passing data back to the parent window from a pop up window.
Here something that I did ages back as a substitute for not getting python to communicate. I went ahead I did it in JavaScript.
I had been wondering how I might do a sin wave path in Photoshop – obviously I had to write some code so after a bit of experimentation this what I came up with in the end, Warning not the prettiest code in the world but it but it works.