Ask a Question

Get Mouse Coordinates

rmanning
Contributor

Get Mouse Coordinates

Hi,



I need to update the mouse click actions for some of my keyword tests, and wonder if there is a way I can "grab" my current mouse pointers coordinates or how I can find out the coordinates of the mouse pointer.



Thanks!



Nevermind, I just realized that the clicks are RELATIVE to the object position, so I can adjust by trial and error 🙂
1 REPLY 1
YMinaev
Staff

Hi,



You can use Sys.Desktop.MouseX and Sys.Desktop.MouseY to obtain the current screen coordinates and then use the target control's ScreenToWindow method to convert them to window-related coordinates.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: