datkewlguy 0 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. ¯ ¯ Share this post Link to post Share on other sites
Jos 2,167 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. Share this post Link to post Share on other sites
datkewlguy 0 Posted March 5, 2005 Can you give me an example? ive played around with that stuff and its not working... Share this post Link to post Share on other sites
Jos 2,167 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. Share this post Link to post Share on other sites