joe
Full Member
Posts: 46
|
Post by joe on Jan 24, 2023 22:56:35 GMT
I am trying to create a macro that left clicks on a button on a website, then drags the mouse to a different position, and then releases the left mouse button. The below code is what I have come up with so far but it doesn't really work. When I run the code it positions the mouse at the first point, clicks the left button down, then drags the mouse to the second position, and then it releases the left mouse button. I know the code clicks the mouse when it is suppose to because the mouse pointer changes shape to indicate that it "grabbed" the object. But the button that the mouse is suppose to click and drag does not move. What am I doing wrong?
1 | RUN ACTION | WAIT SECONDS | 2
2 | 845 | 645 | 2000 | LEFT CLICK DOWN
3 | 978 | 653 | 2000 | LEFT CLICK RELEASE
|
|
joe
Full Member
Posts: 46
|
Post by joe on Jan 25, 2023 21:28:36 GMT
I actually came up with an easy fix for my problem. I'm embarrassed that I didn't figured this out before. So I clicked on the red button in the upper left hand corner of the MMM app (and I checked the box next to Mouse) and then I started the mouse click and drag macro that I wanted to create. But when I used this strategy I end up recording more mouse movements than I really want to, so this requires that I edit out some of the lines of code that I don't need. The two differences between working code and the code that didn't work for me is how the code was created and the mouse movement codes. The working code is below:
* | click and drag 2
1 | 847 | 643 | 100 | Left Click Down
2 | 847 | 643 | 221 | Mouse Movement
3 | 850 | 643 | 22 | Mouse Movement
4 | 857 | 643 | 16 | Mouse Movement
5 | 867 | 643 | 24 | Mouse Movement
6 | 884 | 643 | 31 | Mouse Movement
7 | 906 | 643 | 10 | Mouse Movement
8 | 910 | 643 | 16 | Mouse Movement
9 | 913 | 643 | 10 | Mouse Movement
10 | 921 | 643 | 10 | Mouse Movement
11 | 925 | 643 | 16 | Mouse Movement
12 | 930 | 643 | 22 | Mouse Movement
13 | 938 | 643 | 16 | Mouse Movement
14 | 941 | 643 | 10 | Mouse Movement
15 | 946 | 643 | 10 | Mouse Movement
16 | 950 | 643 | 100 | Left Click Release
|
|
|
Post by philranger on Jan 25, 2023 22:45:10 GMT
Hi Joe,
Thanks for sharing your solution, it will help if other users have the same issue. My bets would have been to add a coupe “mouse movements” or maybe release quicker but your solution was the most likely.
Thanks again!
|
|
|
Post by zeak on Jan 30, 2023 5:13:22 GMT
Hi Joe,
Give this a try,
* | click and drag 3 1 | 847 | 643 | 100 | Left Click Down 2 | 946 | 643 | 10 | Mouse Movement 3 | 950 | 643 | 100 | Left Click Release
|
|