How
Fri Dec 07 11:41:00 PST 2007
Thanks for the advice.
"Tom Lavedas" wrote:
> On Dec 7, 2:24 am, How <H...@discussions.microsoft.com> wrote:
> > "Tom Lavedas" wrote:
> > > On Dec 6, 11:55 am, mr_unreliable <kindlyReplyToNewsgr...@notmail.com>
> > > wrote:
> > > > How wrote:
> > > > > hi all,
> >
> > > > > i am using window xp. I have too many start up programs and i have two
> > > > > monitor during work. So i am curious if there is any script that we can open
> > > > > up programs with same size and location on the screen whenever i click on the
> > > > > scipt?
> >
> > > > How, afaik there is no way to do this with script.
> >
> > > > If you are willing to use the system api, it is not all that
> > > > difficult. You would use a "system hook" (WH_CBT would do)
> > > > to receive notifications when new windows appear. Then, if
> > > > the window appearing is one you are interested in, you would
> > > > send it a SetWindowRect message, with the size and location
> > > > you wished to impose.
> >
> > > > While you can't call the system api from wsh/vbs without a
> > > > third-party control, there are other laanguages which support
> > > > using the api. FBSL and freeBasic are two that wold work.
> >
> > > > cheers, jw
> > > > ____________________________________________________________
> >
> > > > You got questions? WE GOT ANSWERS!!! ..(but,
> > > > no guarantee the answers will be applicable to the questions)
> >
> > > While what you write is all true, here is a way to roughly approximate
> > > what the OP is requesting (maybe), using one or more of the
> > > Shell.Application features ...
> >
> > > ' Just a useless example script to illustrate the point.
> > > ' *********** BE WARNED ***********
> > > ' The positions and sizes of open applications on the desktop will
> > > ' be modified significantly after running this!
> > > ' This has no effect on applications minimized on taskbar.
> >
> > > TileHorizontal
> > > wsh.sleep 2000
> > > TileVertical
> > > wsh.sleep 2000
> > > Cascade
> > > wsh.sleep 2000
> > > Minimize
> > > wsh.sleep 2000
> > > UndoMinimize
> >
> > > Sub TileHorizontal
> > > CreateObject("Shell.Application").TileHorizontally
> > > End Sub
> >
> > > Sub TileVertical
> > > CreateObject("Shell.Application").TileVertically
> > > End Sub
> >
> > > Sub Cascade
> > > CreateObject("Shell.Application").CascadeWindows
> > > End Sub
> >
> > > Sub Minimize
> > > CreateObject("Shell.Application").MinimizeAll
> > > End Sub
> >
> > > Sub UndoMinimize
> > > CreateObject("Shell.Application").UndoMinimizeAll
> > > End Sub
> >
> > > Tom Lavedas
> > > ===========
> > >
http://members.cox.net/tglbatch/wsh/
> >
> > thanks.... but how di i specific only certain program?
>
> You can't unless they are 'minimized' on the task bar when the code is
> run. That's what I meant about this being 'roughly' what you were
> looking for. mr_unreliable gave you the exact answer. I was adding
> something in case a tiled or cascaded look was acceptable.
>
> Tom Lavedas
>