Page 1 of 1

How to record mouse clicks using Ranorex API?

Posted: Fri Oct 21, 2011 1:30 am
by Arny
Hello,
I am developing user activity recorder with some specific features.
I use Python .Net and Ranorex API.
My question is how can I handle and record mouse events particularly (left click, right click and double clicks).
I know that Ranorex has the method: MouseEventHandler.
However, API documentation does not show how to use this method to hook to mouse events.
Could you please elaborate on this and post some code snippet for mouse click recording (how it is performed in Ranorex Recorder?)
Thank you in advance.

Re: How to record mouse clicks using Ranorex API?

Posted: Fri Oct 21, 2011 1:03 pm
by Support Team
Hi,

You can create Event Handlers which catches the thrown Mouse Events, therefore take a look at the following site (Ranorex Namespace->Mouse->Events).

Regards,
Markus
Ranorex Support Team

Re: How to record mouse clicks using Ranorex API?

Posted: Tue Oct 25, 2011 9:29 pm
Hi,
Thank you for you response.
Now, I can use Mouse.Up or Mouse.Down event handlers.
However, these events only refer to one time mouse click. Do you provide Double Click events?
I've tried MouseEventArgs.Clicks, but its value is always one (does not matter whether it was dbl click or single click).
To sum up: how can I trace double click events?

Re: How to record mouse clicks using Ranorex API?

Posted: Thu Oct 27, 2011 12:49 pm
by Support Team
Hi,

There is no double click event itself - it's a combination of some mouse down/up events.

You have to define this event on your own (combining these down/up events in a reasonable way), using the information which are proviced by the classes Mouse and MouseEventArgs.

Maybe this link will help you to write this Event http://www.codeproject.com/KB/system/gl ... mhook.aspx.

Regards,
Martin
Ranorex Support Team