cark
New Member
Posts: 2
|
Post by cark on Oct 20, 2020 21:07:39 GMT
I have been stumbling around on the forums, the website and youtube to try and get my macro working, but I appear to be doing something incorrectly as my macro seems to fail at the second line and dow
The code snippet I am trying to run is below:
1 | 446 | 225 | 100 | Left Click Down
2 | 446 | 225 | 103 | Left Click Release
3 | RUN ACTION | WAIT SECONDS | %random_5-10%
4 | 446 | 225 | 359 | Left Click Down
5 | 446 | 225 | 127 | Left Click Release
6 | RUN ACTION | WAIT SECONDS | %random_5-10%
7 | 926 | 225 | 100 | Left Click Down
8 | 926 | 225 | 102 | Left Click Release
9 | RUN ACTION | WAIT SECONDS | %random_5-10%
10 | 926 | 225 | 295 | Left Click Down
11 | 926 | 225 | 112 | Left Click Release
12 | RUN ACTION | WAIT SECONDS | %random_5-10%
13 | 1406 | 225 | 100 | Left Click Down
14 | 1406 | 225 | 126 | Left Click Release
15 | RUN ACTION | WAIT SECONDS | %random_5-10%
16 | 1406 | 225 | 312 | Left Click Down
17 | 1406 | 225 | 104 | Left Click Release
18 | RUN ACTION | WAIT SECONDS | %random_5-10%
The intent is to make the macro wait a random number of seconds (somewhere between 5 and 10 seconds) between each mouse click down and mouse click release.
Any tips or advice on how to fix it would be greatly appreciated.
|
|
|
Post by Steve on Oct 21, 2020 8:32:02 GMT
Hi cark At first glance your code looks ok. I noticed the errors after I ran it. Its your space after the delim char for all your Left Click lines. You have this: 1 | 446 | 225 | 100 | Left Click Down 2 | 446 | 225 | 103 | Left Click ReleaseYou should have this: 1 | 446 | 225 | 100 | Left Click Down 2 | 446 | 225 | 103 | Left Click ReleaseAlternatively you could also combine the down and release into one line like this: 1 | 446 | 225 | 100 | Left ClickHope this helps. Steve.
|
|
|
Post by Steve on Oct 21, 2020 8:41:25 GMT
The intent is to make the macro wait a random number of seconds (somewhere between 5 and 10 seconds) between each mouse click down and mouse click release. Any tips or advice on how to fix it would be greatly appreciated. Oh - to answer off the main question "How do i make my macro wait a random number of seconds?" Your syntax was good for that: 1 | RUN ACTION | WAIT SECONDS | %random_5-10% I'd say this was failing in your macro because of your errors in the lines prior.
A tip would be to use a for loop with this macro to loop through your five clicks. Your macro could be condensed down to this: 1 | FOR | I | = | 0 TO 5 | NEXT 2 | 446 | 225 | 100 | Left Click 3 | RUN ACTION | WAIT SECONDS | %random_5-10% 4 | FOR | NEXT
|
|
|
Post by Victor on Jun 9, 2021 16:31:00 GMT
Hi cark At first glance your code looks ok. I noticed the errors after I ran it. Its your space after the delim char for all your Left Click lines. You have this: 1 | 446 | 225 | 100 | Left Click Down 2 | 446 | 225 | 103 | Left Click ReleaseYou should have this: 1 | 446 | 225 | 100 | Left Click Down 2 | 446 | 225 | 103 | Left Click ReleaseAlternatively you could also combine the down and release into one line like this: 1 | 446 | 225 | 100 | Left ClickHope this helps. Steve. Hey Steve, i'm pretty much new to coding macros but i want to learn some stuff to make my work a bit easier. I already have a macro made for a part of my work and i did it as best as possible, but, i would like to make it more complex by adding some extra steps with some conditions and variables, for example, i need to code the macro to press Right key for a random amount of seconds before releasing it. Could i do it this way in order for it to work as i intend it to? (I'll just copy paste the lines already used on this thread just to make the example) 1 | 446 | 225 | 100 | Left Click Down 2 | RUN ACTION | WAIT SECONDS | %random_5-10% 3 | 446 | 225 | 103 | Left Click Release I think i explained it correctly, idk, but if you think there's a better way to do it let me know
|
|
|
Post by philranger on Jun 12, 2021 19:19:14 GMT
Hello
Do you mean right click or the « arrow right » on the keyboard
Case 1: use right click instead of left. Rest of your code looks ok Case 2: use Keypress right. Edit: ever mind, I see Steve answered the new topic
|
|
|
Post by Steve on Jun 13, 2021 1:15:38 GMT
|
|