Jump to content

WinMove and Multiple Windows


Recommended Posts

  • Moderators

For the first part of your question, you could probably test what it does faster than you could type out the question. Try exactly what you said, WinMove)"", "", 0, 0) on a mult-monitor system - what does it do?

For the second part of your question, have you searched the forum? A search of "winmove multiple monitor" returns a number of instances where this has been discussed. What have you tried?

Edit: A google search returns even more results - site:autoitscript.com winmove multiple monitor

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

I tried the following, but it wasn't moving to Display 1, so I was trying to determine if the displays are seen as one giant display, or two.  I did find some custom functions, but I assumed that must have been an oversight.  It seemed like AutoIt would have this native.  So the only way to do this is through something like this UDF?

WinMove ( "Chrome", "", 0, 0)
WinSetState("Chrome", "", @SW_MAXIMIZE)

 

Link to post
Share on other sites

When I close IE on my second monitor, that is where it will start backup.  I run a script that needs to run on my main monitor.  This is what works for me.  Should be able to adapt it to work with Chrome. 

$oIE = _IECreate ("https://www.yourwebsite.com")
Sleep (3000)
$HWND = _IEPropertyGet($oIE, "hwnd")
WinMove($HWND, "", 0, 0, 400, 400)
Sleep (6000)
WinSetState($HWND, "", @SW_MAXIMIZE)

This will always (at least for me) end up with a maximize IE window on my main monitor

Link to post
Share on other sites
4 hours ago, xcaliber13 said:

When I close IE on my second monitor, that is where it will start backup.  I run a script that needs to run on my main monitor.  This is what works for me.  Should be able to adapt it to work with Chrome. 

$oIE = _IECreate ("https://www.yourwebsite.com")
Sleep (3000)
$HWND = _IEPropertyGet($oIE, "hwnd")
WinMove($HWND, "", 0, 0, 400, 400)
Sleep (6000)
WinSetState($HWND, "", @SW_MAXIMIZE)

This will always (at least for me) end up with a maximize IE window on my main monitor

There is actually an autoit script you can download in the downloads section which already does something very similar to what you want:

 

 

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...