Forum Discussion
Vijay,
I see. The MouseDown method is available only for the Desktop object. As you said, this method works with screen coordinates. You need to convert window coordinates to screen coordinates before calling this method. For the conversion, use the WindowToScreen method of your window object.
...
Set pointObj = MyWindowObject.WindowToScreen(10, 10) ' Convert coordinates
Call Sys.Desktop.MouseDown(VK_LBUTTON, pointObj.X, pointObj.Y) ' Call the MouseDown method
...
- tristaanogre7 years agoEsteemed Contributor
First of all... this thread is 7 years old... Might be better to have posted your own question since there is no guarentee, after 7 years, that the original people are still around.
That said... Since you're using the Desktop object MouseDown method, you have the wrong number of parameters. See https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/desktop/mousedown-method-desktop-object.htmlRemove the ms parameter and you should be good.
- Charles_Liao7 years agoNew ContributorThanks for reply!
Because the the problem of network, I have simetime can not acess community.
I have solved this problem.
The LLPlayer.mouseDown method actually must have 4 parameters including ms and the ms parameter is the delay between Mouse Down and the last action instead of the delay during mouse press.The sys.desktop.mouseDown method must have 3 parameters except ms. This makes me confused and we should note...- tristaanogre7 years agoEsteemed Contributor
Correct.... there are two MouseDown methods depending upon what the parent object is. The Deskstop.MouseDown is simply for simulating clicking down on a mouse on a place on screen. LLPlayer.MouseDown comes from the Low-Level player which ties more closely into the low-level drivers of the Windows OS. Both methods are documented... I linked in the Desktop one... here's the LLPlayer one.
Making sure you're using the correct method is always a bonus.
Related Content
- 8 years ago
- 13 years ago
- 11 years ago
- 13 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago