Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Saving Cursor Window
#1
I am very new to quick macro. To do what I want to do with it I need to know the best way to do one thing.

I have three onscreen windows that I will be performing various functions on. Before I perform any of the functions I want to save the cursor position and afterwards restore it. I have figured out storing the cursor positions without a problem. What I am trying to figure out is how determine which window the cursor is in and restore to that window. I have spent a couple of hours with it. I imagine one or two lines of code would get me on my. Can anyone help? Thank you
#2
example
Macro Macro2540
Code:
Copy      Help
;save
int wMouse=win(mouse)
POINT p; xm p wMouse 1
;message box
mes F"This macro will restore mouse position relative to window:[][]{_s.getwintext(wMouse)}"
;restore
mou p.x p.y wMouse 1
another example
Macro Macro2540
Code:
Copy      Help
;save
int wMouse=win(mouse)
;activate another window
act win("" "Shell_TrayWnd")
;wait 1 s
1
;activate wMouse
act wMouse
#3
Wow. That would have taken me a good while. I appreciate it. I will dig through it and see if I can understand it.


Forum Jump:


Users browsing this thread: 1 Guest(s)