I have only been able to get the center of the main screen but not the center or get to the center of the 2 other monitors I have. Can anyone help me with this? Ideally I would like to have macro that can circle through the center of each the screens. I occasionally have a 3rd monitor and I would like to be able to do that one too.
With the current macro that I have only gets me to the main screen but I still have to move the mouse to one of the other monitors and it has become kind of annoying. Thank you everyone for your help!
Read this just after I'd got home, set up a second display, and got ready to test...
Do you know what the issue was first time round?
If anyone's got 3 or more displays, I'd love to hear if the logic's sound in those situations too. Also if the top-to-bottom indexing assumption for vertically-stacked displays is correct.
I'm not entirely sure what it was that went wrong the first time. I recreated the macro step by step to understand how it works (still a little confused ) but it worked after I remade it.
I have connected the other displays I had and it worked perfectly! I had 4 displays.
If you know how many screens you need to cater for then the macro is easier -- so , for 3 screens, "If I'm on screen 1 then go to the middle of screen 2, if 2 then go to middle of 3, if 3 then go to middle of 1". We're taking advantage of screens being indexed 1..n, left-to-right.
Problem is that they don't wrap -- you can't do "screen 3 + 1" and go to screen 1 -- and we don't know how many "If"s to do if we don't know the number of screens in advance. So we have to work things out at runtime. I've brain-farted and over-complicated things by using the MOD function -- "modulo division", or "just get the remainder" -- and this version is probably clearer:
So "Get the index of the screen the pointer is on and add 1, saving as Local_nextScreen. If Local_nextScreen is greater than the number of screens, set it to 1 (our 'wrap-around' from eg screen 3 back to 1). Move the mouse to coordinates MidX, MidY of screen index Local_nextScreen."