|
Post by jamesjts on May 1, 2018 23:48:55 GMT
Hi thanks in advance for the assistance. I have a mouse click that needs to be repeated 100+ times. How do i get it to repeat without actually listing it 100+ times but instead just saying repeat this # times
|
|
|
Post by SammyJ on May 4, 2018 2:07:14 GMT
Hi,
This would work:
1 | RUN ACTION | | | | DEFINE INTEGER VARIABLE | %INTEGER%::0 2 | 1294 | 594 | 1030 | Left Click 3 | RUN ACTION | | | | DEFINE INTEGER VARIABLE | %INTEGER%::+1 4 | IF | INTEGER VARIABLE | %INTEGER% | < | 99 | GOTO MACRO LINE | 2
Line 1 sets the value of the variable %integer% to 0 Line 2 does the click. 1294 is the mouse x position, 594 is the mouse y position, and 1034 is time in milliseconds to wait. This would also work for line 2 : 2 | X | X | 200 | Left Click Here the mouse pointer is skipped by the 'X'. Meaning that the mouse would not move. The time has been changed to 200 milliseconds to be a bit faster. Line 3 adds 1 to the value of %integer% Line 4 checks the value of %integer%, IF is is less than (<) 99 then go back to line 2. Effectively this creates a loop that runs 100 times for your click.
Hope this helps.
|
|
|
Post by Steve on Aug 14, 2018 4:23:26 GMT
A better way would be to use a FOR LOOP:
1 | FOR | I | = | 1 TO 101 | NEXT 2 | X | X | 500 | Left Click 3 | FOR | | | | NEXT
Here we loop 100 times counting from 1 to 100. At line 2 we do out left click. We omit the mouse position using 'X' so the mouse will click wherever our courser is currently.
Hope this helps. Steve.
|
|
|
Post by Craig on Sept 2, 2018 1:42:54 GMT
Nice One
|
|