5471665561 1 Posted October 13, 2010 I've been having an issue with windows popping up behind my game (I play it in windowed+maximized due to running dual screens and sometimes my game just refuses to let other windows take the foreground from it). So my solution was to design an autoit script that would take all newly opened windows that are smaller than a certain size and move them to the center of my secondary screen for easy usage. I think the idea would work in theory but I'm not specifically sure how to implement it. I know i can get the windows size via WinGetPos(if i have the windows title) and i know i can move the window to a certain position via WinMove(which once again requires a title). My issue is that I don't know what command to use to get the title of any program on my main screen. Any ideas? Share this post Link to post Share on other sites
JohnOne 1,603 Posted October 13, 2010 I know nothing about dual monitors, but a start for your problem might be to look at the WinList() function which returns an array of all the windows. If you run that in a loose loop every so ofter and check fro extra windows, it lists window name and handle in most cases. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
5471665561 1 Posted October 13, 2010 well for my particular setup, my "main" screen is right and my "secondary" screen is left, so position wise i just send the window to -500 for example...as for the command...i appreciate it Share this post Link to post Share on other sites
5471665561 1 Posted October 13, 2010 (edited) Is it possible to use Or in an If statement in autoit? Such as if windowSize[2] < certainAmount or windowSize[3] < certainAmount If so how? EDIT: nvm, found it Edited October 13, 2010 by Durnt Share this post Link to post Share on other sites
JohnOne 1,603 Posted October 13, 2010 (edited) Yes it is, and exactly how you wrote it. If $windowSize[2] < $certainAmount Or $windowSize[3] < $certainAmount Then ;whatever EndIf Edited October 13, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites