Sorry to bring this old thread up again, but I've found a more elegant solution to this problem.
It seems to me that the dialog box loses focus only when the active window is one that's being run with windows compatibility mode options. I also tried everything I could think of to get the focus back to the dialog box once it had lost it, but nothing worked. The key seems to be to shift the focus to a powerpro bar BEFORE you call up the dialog box. Thus, I inserted first a "*script assign c caption" and then a "*window show b_TASKS" [=name of my permanently visible Ppro taskbar in the top center of the screen] AT THE START of my script. Now if you open the dialog it takes focus just fine. (If you don't use permanently visible bars, just have Ppro pop up an empty dummy bar and hide it again later.) Then, when I need the script to interact with the window of the application that caused the problem, I merely execute "*window show! ³(c)" ["³" being my special character for flagging Ppro expressions]. So far this has solved the problem for me. Phil
