Batch processing about color balance? The previous images can't be closed

Hi everyone,
Here are my marcos:
run(“Make Composite”);
run(“Color Balance…”);
run(“Enhance Contrast”, “saturated=0.35”);
run(“Close”);
run(“Color Balance…”);
Stack.setChannel(2)
run(“Enhance Contrast”, “saturated=0.35”);
run(“Close”);
Stack.setChannel(3)
run(“Color Balance…”);
run(“Enhance Contrast”, “saturated=0.35”);
run(“Close”);
run(“Stack to RGB”);
run(“Save”);
close();

The problem is that the previous images never closed and I guess it should be selected first. If not closed, the existed images could influence the next images.But the Selectwindow() coomand is a liitle bit difficult to me. So what should I do to select the images or make it actived. Thanks a lot for your advices!