Posts: 26
Threads: 7
Joined: Jul 2018
Hi everyone,
Is there a way to set a window to automatically open to a specific location on the screen? Or like intercept it before it opens and move it to that location? Thanks!
Posts: 1,337
Threads: 61
Joined: Jul 2006
01-01-2019, 08:37 PM
(This post was last modified: 01-01-2019, 08:58 PM by Kevin.)
here is a list of possible screen positions to open the window to
uncomment 1 x= and 1 y= to move to a specific location
Function
move window example
int hwnd
run "$system$\notepad.exe" "" "" "" 0x800 win("" "Notepad") hwnd
int x y
RECT r
;top left
;------------
;x=+1
;y=+1
;Bottom left
;------------
;x=+1
;y=-1
;top right
;------------
;x=-1
;y=+1
;Bottom Right
;------------
;x=-1
;y=-1
;center
;------------
;x=0
;y=0
;top center
;x=0
;y=1
;bottom center
;------------
;x=0
;y=-1
;right center
;------------
;x=-1
;y=0
;left center
;------------
;x=1
;y=0
r.left=x; r.top=y
AdjustWindowPos hwnd &r 3
Posts: 26
Threads: 7
Joined: Jul 2018
Thank you so much! I'll play around with it, but I might get a bit confused and need a little more guidance...