Re: Simple way to have window go to same position each time?

"brucexs-/[email protected] [power-pro]" <[email protected]>
Newsgroups gmane.comp.windows.power-pro
Message-ID <[email protected]>
The window command in the more commands box of the hot key is the right idea. 

 But there are two challenges.
 The first challenge is that you have to identify the window you want moved to PowerPro somehow.  There has to be some way to tell powerpro which window to move.  If the window always has a know part of the caption you can use that.  For example, Notepad captions always end in Notepad, so you can use *notepad.  Or you can use the exename preceded by an = as in =notepad or =winword (for ms word).  See help, index "caption lists" for details.
 

 The second challenge is that many programs take time to open, and you have to allow for that before issuing the window move command.  The win.forinterval(number) should therefore precede the window move command in the move commands.
 

 So for starting and moving notepad, the command entry would be
 

 Command notepad
 More Commands
 wait.forinterval(250)
 window position 10 50 300 200 *notepad
 

 Note:  you may need to change the wait interval to something longer than 250 ms.    Of course, you will need to change the position numbers and the caption.
 

 The autorun is another way to specify the window to be moved.  It is used in conjunction with autorun command lists.  See help index,  auto run commands when window opens
 

 BTW, it is not Windows that remembers the last position of a program's window.  Each program must do that for itself,  Some do, some don't.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.