was just messing around made this
puts all 9 different positions in 1 function and lets you choose at run time where to place the window. Uses a list dialog.
Function MoveActiveWindow
if you would want to run this specifically from qm i would recommend putting a trigger on it
something like this
Function MoveActiveWindow
Trigger CAF8
puts all 9 different positions in 1 function and lets you choose at run time where to place the window. Uses a list dialog.
Function MoveActiveWindow
int iSel=ListDialog("Top Left[]Top Center[]Top Right[]Left Center[]Center[]Right Center[]Bottom Left[]Bottom Center[]Bottom Right" "Select a screen position to move the active window" "Choose a Position")
sub.MoveWindowToScreenPosition(iSel-1)
#sub MoveWindowToScreenPosition
function position
int x y
sel position
,case 0;;Top Left
,x=1
,y=1
,case 1;;Top Center
,x=0
,y=1
,case 2;;Top Right
,x=-1
,y=1
,case 3;;Left Center
,x=1
,y=0
,case 4;;Center
,x=0
,y=0
,case 5;;Right Center
,x=-1
,y=0
,case 6;;Bottom Left
,x=1
,y=-1
,case 7;;Bottom Center
,x=0
,y=-1
,case 8;;;Bottom Right
,x=-1
,y=-1
,case else
,ret
int hwnd=RealGetNextWindow(0)
RECT r
r.left=x; r.top=y
AdjustWindowPos hwnd &r 3
act hwndsomething like this
Function MoveActiveWindow
Trigger CAF8

int iSel=ListDialog("Top Left[]Top Center[]Top Right[]Left Center[]Center[]Right Center[]Bottom Left[]Bottom Center[]Bottom Right" "Select a screen position to move the active window" "Choose a Position")
sub.MoveWindowToScreenPosition(iSel-1)
#sub MoveWindowToScreenPosition
function position
int x y
sel position
,case 0;;Top Left
,x=1
,y=1
,case 1;;Top Center
,x=0
,y=1
,case 2;;Top Right
,x=-1
,y=1
,case 3;;Left Center
,x=1
,y=0
,case 4;;Center
,x=0
,y=0
,case 5;;Right Center
,x=-1
,y=0
,case 6;;Bottom Left
,x=1
,y=-1
,case 7;;Bottom Center
,x=0
,y=-1
,case 8;;;Bottom Right
,x=-1
,y=-1
,case else
,ret
int hwnd=RealGetNextWindow(0)
RECT r
r.left=x; r.top=y
AdjustWindowPos hwnd &r 3
act hwnd