Human like mouse movements - winautomation - updated

Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
For modern human-mouse movements, we use the botitng.rs human mouse movements wrapper.
Download here
https://botting.rs/resources/natural-mouse-movements.23/


If you wish to use the old version, continue reading below.
Winautomation is great, but it has limitations.
The built-in mouse movement functions are great, but aren't realistic, and don't simulate human-like mouse movements at all.
They move in absolutes, perfect horizontal, vertical and diagonal movements.
Although scrutinized somewhat, a lot of people speculate Jagex use mouse movement patterns as a detection method.
To make our bots seem a bit more realistic, we will be simulating human-like mouse movements using a python script.
To clarify, I didn't create this script at all, so full credits to the developer.


Downloads & Configuration

You can download the .zip/project here
You can download python here
Demo script here


Once you've downloaded the project and requirements, we need to configure it.
Unzip the project zip file, and drag the project into a folder on your desktop.
Open command prompt (CMD) and type the following:
cd Desktop/pyclick (or whatever the folder is named)
In the requirements.txt file, remove the line "pkg-resources==0.0.0"
Now type: pip install -r requirements.txt
This will install most of the requirements for the pyclick project.
Once that finishes, type the following:
pip install numpy
pip install pyautogui
Once done, you should be good to go.

I've included a demonstration script you can use, in the download section above.
To customize the number of curves, knots, shakiness of the hand etc you will need to edit "humancurve.py"
To customize it automatically with winautomation, you just need to write random numbers to variables and write to the demo file.py I included.
In these steps:
1. generate a random number using a random number generator, and store into a variable
2. In the demo script, replace the default number(s) with the variable
3. Get the mouse position or change the mouse position to whatever you want.
4. Write the customization to the script.py
5. Run the script with "run dos command" and use the command "py scriptname.py" and change the working directory to the project location
I will make a full video guide for this soon, currently have to remake some stuff, PC died and I lost a little bit of stuff.
But yeah here's the end result, a bot using human-like mouse movements
 
Last edited:
R

ramz

New member
Messages
11
Joined
Oct 10, 2019
Reaction score
0
Points
1
Credits
15
I freshly installed python and when i try to do "pip install -r requirements.txt"

on first run i get this message: https://pastebin.com/zrjkg8F2

if i remove pkg-resources==0.0.0 from the requirements txt

i get this error at the bottom of this log(big size so must be uploaded somewhere else): https://zerobin.net/?5896c910088bb14a#/WgxHRd03Gxkj/IWeosLmiVzVj4Qn/+/lbeN+vMx6jw=

this is what happens when running demo.py after getting them errors: https://pastebin.com/iiQ1nHTT

do you know any way to fix them errors and run it sucessfully?
 
Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
I freshly installed python and when i try to do "pip install -r requirements.txt"

on first run i get this message: https://pastebin.com/zrjkg8F2

if i remove pkg-resources==0.0.0 from the requirements txt

i get this error at the bottom of this log(big size so must be uploaded somewhere else): https://zerobin.net/?5896c910088bb14a#/WgxHRd03Gxkj/IWeosLmiVzVj4Qn/+/lbeN+vMx6jw=

this is what happens when running demo.py after getting them errors: https://pastebin.com/iiQ1nHTT

do you know any way to fix them errors and run it sucessfully?

Run from cmd:
pip install numpy
pip install pyautogui

If it fails and says another package is missing just type "pip install %package%"
Forgot to include that info, apologies!
 
R

ramz

New member
Messages
11
Joined
Oct 10, 2019
Reaction score
0
Points
1
Credits
15
So i got this error next but i managed to fix it, i'll post all the stuff i used to fix the error.



Error: https://pastebin.com/hjiPDEJ6



Files i used:



Cords detection code file: https://mega.nz/#!WEoRFaJQ!43JZwn6qsgYuLmkMv-SXHkE4mWZkSlXyOcJrI8Rgwh0



if you dont trust the file, you can get code from here but i had issue creating it from VM: https://browse-tutorials.com/snippe...IjO9PH54p3wiE_1zpoWi4TYDjSUXq3et62VBQZe7nXuxo



exe to run code: https://www.autoitscript.com/site/autoit/downloads/

after you install autoit exe and run the script but double clicking on it and cordinates shold appear under/next to your mouse

to stop the cords showing press F10 at the top of your keyboard



all you need to do from there is find the cords and replace you want to go FROM and cords you want to go TO and then input them in respective fields



an example is below

 
Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
You can do all that within winautomation :)
If youd like I can provide a script with what actions and whatnot to use?
 
Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
Awesome
So here's an example of how you can grab the mouse coordiantes in winautomation

1. Use a "get mouse position" action which grabs the current mouse position and stores the %X% and %Y% into variables
2. Use a "Write text to file" action, and write the .py script to a file, replace the coordinates with your current mouse position variables.
3. Use a "wait for image" action and grab the location of an image on the screen. At the bottom of the action, store the results into variables "imagex" and "imagey"
4. Finally, enter the result variables into the py script, and write it to a file. Now it will dynamically update depending on the images you wish to find.

Important to set the encoding to default or the script won't run.
You can run the script hidden as an application, or through the "Run Dos" action :)

If this isn't clear enough I'll provide a demo script for you! :)
 
R

ramz

New member
Messages
11
Joined
Oct 10, 2019
Reaction score
0
Points
1
Credits
15
Awesome
So here's an example of how you can grab the mouse coordiantes in winautomation

1. Use a "get mouse position" action which grabs the current mouse position and stores the %X% and %Y% into variables
2. Use a "Write text to file" action, and write the .py script to a file, replace the coordinates with your current mouse position variables.
3. Use a "wait for image" action and grab the location of an image on the screen. At the bottom of the action, store the results into variables "imagex" and "imagey"
4. Finally, enter the result variables into the py script, and write it to a file. Now it will dynamically update depending on the images you wish to find.

Important to set the encoding to default or the script won't run.
You can run the script hidden as an application, or through the "Run Dos" action :)

If this isn't clear enough I'll provide a demo script for you! :)

thanks will try this out :)
 
Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
Yep no worries!
 
Bitcrusher

Bitcrusher

New member
Messages
15
Joined
Oct 17, 2019
Reaction score
1
Points
3
Credits
133
Thanks for the guide! Is it important to use these methods are mouse movements detected?
 
Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
Updated thread since the old method is irrelevant
Added links to the new human mousemovement wrapper
 
R

rogue_ish

New member
Messages
1
Joined
Dec 3, 2019
Reaction score
0
Points
1
Credits
23
Can this human-like movement be moved to another game? I am fairly proficient in the adaptation of previously written scripts. I want to call it as needed from a simple AHK script I have written.

< Answered my own question. Downloaded the wrapper, found the Java dependencies, and got it to be called from AHK. Use "Hide" to suppress the CMD window. It works in my game. Yay. >
 
Last edited:
FUKK

FUKK

New member
Messages
1
Joined
Nov 21, 2020
Reaction score
0
Points
1
Credits
121
Hello, im very new here. And I see last posts were made ages ago. Awesome page, awesome job! I did managed to use mouse movements,but is there any way to make it move faster? :)
 
Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
Hello, im very new here. And I see last posts were made ages ago. Awesome page, awesome job! I did managed to use mouse movements,but is there any way to make it move faster? :)
yes generate a random number %randomtime%
add that at the end, for the milliseconds you want to use, eg random number 50,200
 
Top Bottom