Jump to content

Moving windows to another monitor


Recommended Posts

How would I target a 2nd monitor (in extended mode) for a `Run()` or a `WinMove()` function?

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

  • Moderators

Hi, mechaflash213. I would start with _WinAPI_EnumDisplayDevices in the help file if you haven't already. It creates an array of installed monitors. This may get you started.

"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 comment
Share on other sites

I've followed what you said, and I now have identified each monitor. I've even set up the conditional statements for the command, but now, I still need to tell it to move the window to the monitor in question. I don't see a way of targeting it in the `Run()` or `WinMove()` functions, but I'm thinking of iterating over the desktop resolution, and using the `WinMove()` function with negative parameters of the window.

Is this the method that I'm going to have to use or is there a better or more proper way?

EDIT: Just thought about something... if the user's monitor resolutions aren't identical, it won't work as intended as fetching the window resolution via @DesktopWidth and @DesktopHeight only returns the values for the primary display.

Edited by mechaflash213
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

  • 5 months later...

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...