Better mouse randomization?

Ask gaming related questions (AHK v1.1 and older)
ShadyShoots
Posts: 24
Joined: 23 Jan 2018, 18:04

Better mouse randomization?

23 Jan 2018, 18:08

Currently I'm using a combination of the RandomBezier function and a function that moves the mouse randomly within a circle/oval, each time I'll have a few possible circles it can click within, the issue is where these circles overlap will create hotzones where I click 2x as often, I'm trying to figure out a way to click randomly within a set area, but this area needs to be an irregular shape, not a square or circle.

Ideally I'm thinking somehow I could use an image as a map, say black and white, where I could paint the area I want to be able to click, although I'm not sure if/how I could accomplish this.
GreatGazoo
Posts: 69
Joined: 28 Dec 2017, 02:53

Re: Better mouse randomization?

23 Jan 2018, 23:28

is the mouse already sending clicks at random and moving random as well?

if you can figure out how this script works, it should be possible
https://autohotkey.com/boards/viewtopic ... e+movement
Last edited by GreatGazoo on 24 Jan 2018, 01:02, edited 1 time in total.
ShadyShoots
Posts: 24
Joined: 23 Jan 2018, 18:04

Re: Better mouse randomization?

24 Jan 2018, 00:45

GreatGazoo wrote:is the mouse already sending clicks at random and moving random as well?
Yes it's already clicking within a random area 2-3 circles to choose from, moves mouse with a random curve to a random position in a random one of the circles. However I've just brainstormed up an idea how to fix my hotzones issue, all I need to know is how to select a random set of coordinates from an object like this

Code: Select all

Point :=   {465:89,496:87,527:88,442:108}
It goes X:Y, next coordinate etc. Already have a way to quickly create a list of coordinates.
GreatGazoo
Posts: 69
Joined: 28 Dec 2017, 02:53

Re: Better mouse randomization?

24 Jan 2018, 01:06

I was going to suggest random number generator, I guess you can use it to input variables as coordinates or sleep times between clicks, there is even a way to make it exclude numbers or not repeat the same number which would solve your over lapping issue https://www.youtube.com/watch?v=nvxJXfPf0pg

Code: Select all

^j::
    Random, rand, 1, 10000
    send, %rand% {enter}
	return
ShadyShoots
Posts: 24
Joined: 23 Jan 2018, 18:04

Re: Better mouse randomization?

24 Jan 2018, 01:26

GreatGazoo wrote:I was going to suggest random number generator, I guess you can use it to input variables as coordinates or sleep times between clicks, there is even a way to make it exclude numbers or not repeat the same number which would solve your over lapping issue https://www.youtube.com/watch?v=nvxJXfPf0pg

Code: Select all

^j::
    Random, rand, 1, 10000
    send, %rand% {enter}
	return
Yeah that won't work, using that you end up with a square area to click within. I've got a script to search an image map I create, and list the coordinates where it finds black pixels (the area I want to click) and saves the entire list. Now I'm just trying to figure out how I can take this text file, and make an array with it using the X/Y coordinates on each line then randomly select one of the arrays. I think I've found most of it, just trying to figure out how to create the array with a textfile rather than tons of lines with spots.insert

Code: Select all

spots := [] ;create en empty array
spots.insert([100,200]) ;x=100 y=200
spots.insert([400,600])
spots.insert([50,200])
spots.insert([350,95])
return

; randomly select from array
total := spots.MaxIndex()
random,value,1,%total%
xPos := spots[value][1] ;array[index][index]
yPos := spots[value][2]
Click, %xPos%,%yPos%
return
GreatGazoo
Posts: 69
Joined: 28 Dec 2017, 02:53

Re: Better mouse randomization?

24 Jan 2018, 03:35

yeah its just as i thought...

you are way more advanced at this then i am

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 40 guests