Page 1 of 1

Picking up X and Y current mouse location and add a value

Posted: 06 May 2022, 16:05
by viktorrios
Hello.
I'm trying this script:

Code: Select all

'HIDmacros command
HIDMacros.SendKeys "f"
Dim MyVar
MyVar = pos.x
HIDMacros.MouseClick MyVar, 483, 1
My intention is to tell HidMacros to recognize the current mouse X position, and add a 15 pixel offset through "MyVar", then Left mouse click to accept.

I get an error with pos.X because this is not the right way to assign "x mouse position" on the screen. Which one is the correct method?
Please help.
Thanks!