datkewlguy Posted March 5, 2005 Posted March 5, 2005 Hey i need 2 windows to be touching horizontally while being in the center of the screen (vertically) and not overlapping. can someone give me two positions that would work? |¯||¯| <-- Anyone know how i can do this?...shouldnt be hard. ¯ ¯
Developers Jos Posted March 5, 2005 Developers Posted March 5, 2005 Hey i need 2 windows to be touching horizontally while being in the center of the screen (vertically) and not overlapping. can someone give me two positions that would work? |¯||¯| <-- Anyone know how i can do this?...shouldnt be hard. ¯ ¯<{POST_SNAPBACK}>these 2 functions and 2 macro's should get you there:WinGetPos()WinMove()@DesktopWidth@DesktopHeight SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
datkewlguy Posted March 5, 2005 Author Posted March 5, 2005 Can you give me an example? ive played around with that stuff and its not working...
Developers Jos Posted March 5, 2005 Developers Posted March 5, 2005 Can you give me an example? ive played around with that stuff and its not working...<{POST_SNAPBACK}>Opt("WinTitleMatchMode", 2) FileWriteLine("file1.txt","file 1") FileWriteLine("file2.txt","file 2") run("notepad file1.txt") run("notepad file2.txt") WinWait("file2.txt - Notepad") $maxWidth = 400 $maxHeight = 400 msgbox(0,'demo','Start center of the 2 windows') $w1=WinGetPos("file1.txt - Notepad") $w2=WinGetPos("file2.txt - Notepad") WinMove("file1.txt - Notepad",'',@DesktopWidth/2-($maxWidth/2),(@DesktopHeight/2)-($maxHeight/2),$maxWidth/2,$maxHeight) WinMove("file2.txt - Notepad",'',@DesktopWidth/2,(@DesktopHeight/2)-($maxHeight/2),$maxWidth/2,$maxHeight) msgbox(0,'demo','Restore window positions') WinMove("file1.txt - Notepad",'',$w1[0],$w1[1],$w1[2],$w1[3]) WinMove("file2.txt - Notepad",'',$w2[0],$w2[1],$w2[2],$w2[3]) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now