Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

finding mouse coordinates/position

If you have a question or need help, this is the place to be.
Post Reply
Stalltime
Posts: 29
Joined: Tue Feb 19, 2013 2:07 am

finding mouse coordinates/position

Post by Stalltime »

hello

I am trying to use mouse move absolute, but I cannot find a way in eventghost to display my X and Y mouse position.

It seems like a simple problem and it must have a simple solution?

Thank you
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: finding mouse coordinates/position

Post by Dragon470 »

There is no action from the mouse plugin, but here is the basic to display the x and y coordinates.

Code: Select all

from eg.WinApi.Dynamic import mouse_event, GetCursorPos, SetCursorPos, POINT

point = POINT()
GetCursorPos(point)

print point.x
print point.y
This was all taken right out of the mouse plugin.
Stalltime
Posts: 29
Joined: Tue Feb 19, 2013 2:07 am

Re: finding mouse coordinates/position

Post by Stalltime »

thanks.

Should I insert this code in eventghost.xml under an action?

Thanks again
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: finding mouse coordinates/position

Post by Dragon470 »

It would look something like this:
mouse point.jpg
Use whatever event item is good for you.
Stalltime
Posts: 29
Joined: Tue Feb 19, 2013 2:07 am

Re: finding mouse coordinates/position

Post by Stalltime »

thanks Dragon, its works . :-)
Post Reply