Random offset - Winautomation

Asentrix

Asentrix

Administrator
Owner
Developer
Messages
303
Joined
Oct 2, 2019
Reaction score
78
Points
28
Credits
33,347
This is a quick guide on how to randomize offsets.
We use "Wait for image" to grab the %X% and %Y% of an image on the screen.
Once the image is found, the position it's found will be stored into the x; and y; variables.


Once we have these variables, we can increase or decrease them using "increase variable" and "decrease variable"


We randomly generate a number between 1-10 and store it into variable %Random%
We then increase the %X% and %Y% by %Random%
Now our mouse will move to that image location with the random offset
 
Top Bottom