Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 monitors and mouse
#1
Hi

I have 2 monitors.
I want to move the cursor (mouse) on the second monitor (and center cursor on the screen) and vice versa.
Is it possible to make that macro?
How to do it?

Best regards
#2
Macro Macro2550
Code:
Copy      Help
int monitor=ListDialog("1[]2" "Monitor" "Center mouse")
if(!monitor) ret
int x y cx cy
GetWorkArea x y cx cy 1 monitor
mou cx/2+x cy/2+y
#3
Thanks Gintaras,
macro works great, but...I will 2 macros without dialog windows.

macro 1 (shortcut 1) = move cursor on the monitor 1 and center
macro 2 (shortcut 2) = move cursor on the monitor 2 and center


How can i do that?
#4
remove ListDialog and use 1 or 2 instead of the monitor variable.
#5
Yeah! Thanks!

And now...cursor is moved to the next monitor AND...
how to make active window "under" cursor without clicking it?
#6
mou 0.5 0.5 win
#7
My code:

int monitor=2
if(!monitor) ret
int x y cx cy
GetWorkArea x y cx cy 1 monitor
mou cx/2+x cy/2+y
mou 0.5 0.5 win


And...cursor is back to the first monitor Sad
Without last line is ok.
What's wrong?
#8
replace win to FirstWindowInMonitor(monitor)

Whole macro:

mou 0.5 0.5 FirstWindowInMonitor(2)
#9
Now is ok - cursor on 1 or 2 monitor, but window is still not active - i must to click to activate the window Sad

Is it possible to auto-activate window (without clicking) "under" mouse cursor?
#10
Something like this:
http://www.sevenforums.com/tutorials/90 ... nable.html

but not permanently on or off.

I would like to have the macro - "move mouse to the next monitor + make window active" - help me please Gintaras.


Forum Jump:


Users browsing this thread: 1 Guest(s)