Using a function to generate window macros

I'd like to generate some graphs, then close out their windows, but have the graphs be recreated if need be via macros. From reading on the forums and in the help manuals, it seems that this may not be possible. Is this true? The DoWindow /N command would be perfect, but /N is incapacitated when a user function is running. Is there a better way to accomplish my end goal?
You can use Execute/P. This posts a command to a queue that is executed when Igor is idling, after any running procedures finish.
hrodstein wrote:
You can use Execute/P. This posts a command to a queue that is executed when Igor is idling, after any running procedures finish.


That worked well. I am including my code if anyone wants to see the solution to my question. This code repurposes a string called ParsedName, and after the DoWindow is passed to Excecute, it is returned to its original name.

        sprintf ParsedName, "DoWindow /N /K %s_%02d", "Plot_"+SpectrumName, j+1
        Execute /P ParsedName
        sprintf ParsedName, "%s_%02d", SpectrumName, j+1