stopping process in sub-window without quitting


I have a sub-window with handlers to do tasks. I want to place a button for users to click if they want to quit the process outright and go back to the main window.

Is there an easy way to “kill” the active process and exit cleanly to the main window?

When I simply script the button to open the main window, it does the job but the process keeps going on in the background and reveals its results when done - something I wanted “killed” in the first place.

On the other hand, when I issue a “quit” command, the application quits completely, thereby defeating the original purpose - which is to exit to the main window but stopping the active process in the sub-window before doing so.

Would appreciate some help. It may turn out the solution may be so simple but I could not think of any right now.

archseed :expressionless: