McBain,

Bruce just added this and each command line it is somewhat lonnnng,
but work well. Also, the answer is long because I've included many
examples...

But this only works in PowerPro version 4.4.09 or later.
(Ctrl+Rightclick any bar + about to check the version).

First, think of any monitor as width and height of 10000 units.
Doesn't matter if the resolution is 800x600 or 1600x1200.

The upper left corner of your monitor is coordinate "x y" of "0 0"

The lower right corner of your monitor is coordinate "x y" of
"10000 10000"

So the "x y width height" of all primary monitors is
"0 0 10000 10000" and doesn't change when used below.



Using this convention, this will position the window "under your
mouse" for any primary monitor of any resolution and each position
can be typed in a "Configure PowerPro - ..." + "Edit list item" +
"Enter command, ..."

Caution, Yahoo adds a line wrap (the DO() is really one line):

; Left half
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "0 0 5000 10000")++ " "++ WIN.Handle("under"))

; Right half
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "5000 0 5000 10000")++ " "++ WIN.Handle("under"))

; Top half
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "0 0 10000 5000")++ " "++ WIN.Handle("under"))

; Bottom half
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "0 5000 10000 5000")++ " "++ WIN.Handle("under"))

; Right bottom quarter
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "5000 5000 5000 5000")++ " "++ WIN.Handle("under"))



If you want to move the window borders slightly off screen and
overlap the active window border over the inactive, subtract 30
units from the both the "x y" and add 60 to both the "width height"

; Left half offscreen && overlapping borders
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "-30 -30 5060 10060")++ " "++ WIN.Handle("under"))

; Right half offscreen && overlapping borders
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "4970 -30 5060 10060")++ " "++ WIN.Handle("under"))

; Right offscreen && overlapping borders
DO("WINDOW Position", win.mappoints("0 0 10000 10000",
win.getworkarea, "4970 4970 5060 5060")++ " "++ WIN.Handle("under"))



Sorry, sometimes I consider myself,

"10-step Ted"




--- In [email protected], "f.doerr" wrote:
>
> Hi,
>
> I try to create a captionmenu that positions a window in the
> upper right corner with the half width and the full height of
> the screen.
>
> ...
>
> But I would like to replace the hard values with variables so
> that it also works after changing the resolution.
>







Attention: PowerPro's Web site has moved: http://www.ppro.org



SPONSORED LINKS
Computer monitoring software Power pro Computer and internet software
Free computer monitoring software


YAHOO! GROUPS LINKS




Reply via email to