Run a TOOL Command, based on selection, in a SINGLE WINDOW

Maybe this thread gives you some informations: