--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote: > > The window command works fine as an additional command. The > complication is that Windows is a multi-tasking system, and is > always trying to do more than one thing at a time. But the way > Windows divides up its time among programs that are running is > effectively arbitrary and you must arrange your PowerPro commands to > allow for that. > > In this case, here is what is happening. > > PowerPro is the active program. PowerPro executes your first > command and asks Windows to launch your program. Windows takes note > of that request. It may not do anything else yet. Most likely that > is what happens. Or it may start to launch the program, but switch > back to PowerPro before the program has completing its > initialization. > > Now PowerPro is still the active program, and your other program has > not been launched or possibly is in the early stages of launching > and has not displayed its window. PowerPro now executes the Window > command for the More commands. But there is no window to resize > since the program you launched has not displayed its window yet, and > in fact, your request to launch the program may have done almost > nothing yet. > > So the window command does not find any window. It either produces > an error message or does nothing, according to whether the ! is in > the command line. > > Eventually, Windows completes the launching of your program and it > displays its window. But by then, it is too late, as the window > command has already come and gone. > > So whenever you are using PowerPro to launch a program and then do > something with it using More Commands, like manipulate the window or > send keys, you have to arrange for PowerPro to wait somehow for the > program you launched to have had a chance to run and display its > window. > > You can use a wait command just before the window command to do this.
Thanks for the explanation Bruce - I understand what goes on now. Regards, CM Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
