Move of mouse and click button is down are not recorded

Ranorex Spy, Recorder, and Studio.
BR_05
Posts: 11
Joined: Thu Apr 05, 2007 8:04 am
Location: Switzerland

Move of mouse and click button is down are not recorded

Post by BR_05 » Fri Apr 20, 2007 9:58 am

For example, I have tested to change the screen resolution, I change the value with slide bar (msctls_trackbar32) but when I play the sequence the change is not recorded only two click or generated on slide component:

Step to reproduce:

1. Right click on Desktop
2. In the menu, choose Properties
3. Click on tab Settings
4. ==> Try to change the value of the screen resolution
5. Stop and play the recording
6.==> You can see that the move of the mouse during mouse down is not recorded.

I think this problem appears each time that we move the mouse and click is pressed. (Left button down during a move)

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Sun Apr 22, 2007 10:34 pm

We have already fixed this bug for Beta2.
I uploaded a daily build (trunk version) for you to try it:

http://www.ranorex.com/download/Ranorex ... -trunk.exe

The Recorder generates the following C# code if you change the resolution:

Code: Select all

// Find child element by Role=Indicator, Name=Position, ClassName=msctls_trackbar32
element = formElement.FindChild(Role.Indicator, "Position", "msctls_trackbar32");
Mouse.MoveToElement(element, new Point(4, 3), 1583);
point = Mouse.Position;
Mouse.ButtonDown(MouseButtonType.LeftButton);
Mouse.Move(new Point(point.X+-45, point.Y+7), 1265);
Mouse.ButtonUp(MouseButtonType.LeftButton);
First we search the position button of the trackbar:

Code: Select all

element = formElement.FindChild(Role.Indicator, "Position", "msctls_trackbar32");
Then we move the mouse to the element and press the left mouse button:

Code: Select all

Mouse.MoveToElement(element, new Point(4, 3), 1583);
Mouse.ButtonDown(MouseButtonType.LeftButton);
4 and 3 are the relative positions of the mouse within the element (you pressed the mouse on x=4,y=3)
1583 is the move time in milliseconds

At last we move the mouse and release the button:

Code: Select all

Mouse.Move(new Point(point.X+-45, point.Y+7), 1265);
Mouse.ButtonUp(MouseButtonType.LeftButton);
Hope it works for you

Jenö
Ranorex Team