Jump to content
Macro Express Forums

Finding which Monitor is active


johnboy691

Recommended Posts

I have two monitors.(1 and 2) I have 1, which is my laptop and primary screen which is set at a different resolution than screen 2 a 17" led montior set at a different resolution (for easier reading.) I know how to capature the resolution using the integer variable; but how can I capture which monitor has the program active. For example, if I want to open internet explorer and a specific url site, it will launch and activate in the monitor where the last internet explorer was closed. That is fine, I just need a way to determine which monitor the newly launched internet explorer window is opened on. Any ideas?

Link to comment
Share on other sites

I am thinking out loud, have never tried anything like this....

 

Use macros triggered by Events (System Events: Resolution Change? Incoming Message? but more likely Process Event) to monitor when processos are launched and closed. Control events might work, although I foresee complications...

 

On closing a process, check the screen resolution, and save one (or both? results as an integer variable into either into the registry, or a file.

 

When opening, check the previously saved screen resolution value or values. If they match, you are on the same monitor, so move window to this monitor. Else move it to the other.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...