Kent,
The question was a generic one since I had been playing with the implementation my friend was write (being his beta tester) and found that I always knew where my commands were being sent since I first acquired the handle to a specific window and no matter what the system did to the screen (as long as the window I wanted to send a command to was not close still worked no matter where the focus was. That was the reason for my question. You are not always guaranteed some user will not leave something running that pops up a dialog box and takes over the focus of the desktop right in the middle of a script which thinks its current focus is on a different window,
=gerry=