"re-sending question to the right bb"

Dear All,

I'm trying to run ViewDock, in Chimera, from a script using the following command in a loop:
runCommand("viewdock " + filename + " AutoDock")

It works fine. However, the ViewDock window remains opened after reading each file. For large number of files it is not practical to close them manually.

Is there a command to close the opened ViewDock windows to add to the script?

   Thank you for your help.

  Ibrahim