Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using CetCursorPos and mov
#1
Hi, I'm trying to create a macro which will grab the mouse position, perform an action in one window and then return the mouse to it's previous location.

Specifically my question is how does GetCursorPos store the information?
I saw something like GetCursorPos &var;
is this correct syntax?
How do I then pull the values from &var and mov to those coordinates?


Thank you for your time
#2
Check out the Help File. It is very helpful.

or type "mou" -> click or put the caret over the word -> press f1

Examples
Code:
Copy      Help
mou 500 300 ;;move the mouse pointer to 500, 300 pixels of the screen
mou 100 150 "Notepad" ;;move the mouse pointer to 100, 150 pixels of "Notepad" window
mou+ 20 -10 ;;move the mouse pointer 20, -10 pixels from current position
mou ;;restore mouse pointer position as it was before first mouse movement/click command in current macro

;Move the mouse pointer  in "Notepad" window, x=100 (relative to "Notepad"), don't change y:
int w = win("Notepad")
mou 100 ym(0 w) w

;Get mouse pointer position, ..., restore mouse pointer position:
int px(xm) py(ym)
...
mou px py


Forum Jump:


Users browsing this thread: 1 Guest(s)