Jump to content

Automatically moving windows


Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...