Ranorex

Move of mouse and click button is down are not recorded

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexRecorder
View previous topic :: View next topic  
Author Message
BR_05



Joined: 05 Apr 2007
Posts: 11
Location: Switzerland

PostPosted: Fri Apr 20, 2007 10:58 am    Post subject: Move of mouse and click button is down are not recorded
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)
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Sun Apr 22, 2007 11:34 pm    Post subject:
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/RanorexRecorder-1.2.0-trunk.exe

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

Code: click into code to enlarge
// 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: click into code to enlarge
element = formElement.FindChild(Role.Indicator, "Position", "msctls_trackbar32");


Then we move the mouse to the element and press the left mouse button:

Code: click into code to enlarge
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: click into code to enlarge
Mouse.Move(new Point(point.X+-45, point.Y+7), 1265);
Mouse.ButtonUp(MouseButtonType.LeftButton);

Hope it works for you

Jenö
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexRecorder All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum