digdig18 Posted April 4, 2014 Share Posted April 4, 2014 (edited) I want to make mouse move to especified location at screen, i'm having trouble with methods All help will be aprecciate! Edited April 4, 2014 by digdig18 Link to comment Share on other sites More sharing options...
Swizzbeat Posted April 4, 2014 Share Posted April 4, 2014 client.moveMouse() Link to comment Share on other sites More sharing options...
digdig18 Posted April 4, 2014 Author Share Posted April 4, 2014 (edited) I tried everything, believe me haha client.moveMouse(new RectangleDestination(coordsx),(cordsy),(widht),(height)),true); For random, i don't care about the location it will be. but when i try to set specified mouse coords it , never works, always appear in a differente location, i think is because of widht or something... Edited April 4, 2014 by digdig18 Link to comment Share on other sites More sharing options...
Maurice Moss Posted April 4, 2014 Share Posted April 4, 2014 Random(0,<maxwidth>) Link to comment Share on other sites More sharing options...
KMJT Posted April 5, 2014 Share Posted April 5, 2014 (edited) I tried everything, believe me haha client.moveMouse(new RectangleDestination(coordsx),(cordsy),(widht),(height)),true); For random, i don't care about the location it will be. but when i try to set specified mouse coords it , never works, always appear in a differente location, i think is because of widht or something... I think you are confused with what the width and height actually represent. Its been awhile since I used the method so I may be wrong but I think width and height represent the maximum displacement (in pixels) from your x and y coordinate parameters. So if you want to do move to an exact spot with no randomization whatsoever, I think you would do one of the following: client.moveMouse(new RectangleDestination(xCord, yCord, 0, 0)); client.moveMouse(new RectangleDestination(xCord, yCord, 1, 1)); And if you want to move your mouse to a position on the screen not necessarily at an exact point, but within a certain randomized screen area from your specified coordinates, you can do something like: client.moveMouse(new RectangleDestination(xCord, yCord, 20, 25)); I wish they would have straight forward methods like: moveMouse(xCord, yCord); clickMouse(xCord, yCord); Its been awhile since i've used click and move methods so I may be completely wrong lol. Edited April 5, 2014 by KMJT Link to comment Share on other sites More sharing options...