avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2019, 03:01 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - artis [ switch to compact view ]

Pages: [1]
mmdoogie... AWESOME!  :Thmbsup:

I was thinking that adjustments like what you did would complete the script while I was working on it.  But I didn't have the skill to pull it off.  Plus I got it working well on my configuration and didn't have much incentive to go very far beyond.  :-[

I'm glad to see you used the midpoint calculations for determining which monitor the window is on.  This is one of my favorite features because I like to "hang" windows off the edges of the monitor.

And it sure does help us new AHKers to stand on the shoulders of GIANTS! (jgpaiva)

Thanks to both of you.

Cool, Artis!
It looks good ;)
(btw.. the code i posted before didn't work if you had the second screen on the left of the first screen?)

Oh it worked just fine!  I just didn't know if worked the other way around.  I probably butchered your code but I was just trying to write it so that I could understand what it was doing.

I'm getting the hang of this now.

I went through and simplified a little bit of the code to work on my Monitors the way I wanted.  I also set the Test to be which monitor the MIDPOINT of the active window is on.  That way I can have windows that hang off the ends of the screen if need be.

Lastly I added some code to the top function to make it work no matter which Left/Right placement someone has. Monitor2 can be to the left or the right of Monitor1.

   1. It ONLY works with Two(2) Monitors, NOT Three(3) or more
   2. It ONLY works on Right/Left positioned monitors, NOT Top/Bottom
   3. It does NOT matter which monitor is on the left and which is on the right.
   4. The script uses the midpoint of the top edge of the active window to determine which monitor it is on.  Then it moves that window to the other monitor in exactly the same position relative to the monitor edges.
   5. This script has not been tested with two monitors with different resolutions.  It should work as long as the windows are near the top of the screens.
   6. It does move maximized windows (first un-maximizing, then moving, the re-maximizing), but will NOT move windows minimized to the taskbar.  (By un-maximizing and re-maximizing this allows the window to use the full screen when being moved from the monitor with the taskbar to the monitor without the taskbar)
   7. The hotkey is Window+Q

Hope this is as usefull to someone else as it is to me!
Thanks jgpaiva for coding this for us!



How about SnapNextMonitor.ahk?

Oh...I think there is a typo in line 20.  I got an error trying to run the script then I changed ModeWindow to MoveWindow and it worked fine.

It works great for non-maximized windows!  If a window is maximized on the left monitor it will move it to the right one still maximized.  But if a window is maximized on the right monitor it disappears completely instead of moving it to the left one.  I can't seem to figure out where it's going.  I have to right click on the taskbar title and select "restore" to get it back.

Thanks a ton for the help!


You have 2 screens that have the same resolution?

Yes I do...17" Monitors...1152 x 864

I don't know if it makes a difference but Monitor1 is on the right and Montor2 is on the left.  BUT Monitor2 is set to be the Primary Monitor (taskbar and icons, and where new programs open) by Windows XP.


I would like to be able to send a window to the the monitor right or left of it's current one with a shortcut.  I would like it to keep it's relative position on the new monitor.

There is a program called MultiMon that has this function but it also does a lot of other things I don't really need.  It uses a small button on the Title Bar just the the left of the minimize button.  This would be ideal but a shortcut would be a good start!

Thanks.  I'm new to AutoHotKey and I tried a script I found on another site but it didn't work.

Pages: [1]