# How can i do this?

## Recommended Posts

pretending that is my desktop, how can i make my mouse click on a random white block and sleep for like 5 secs and click another random blob and sleep etc?

##### Share on other sites

pretending that is my desktop, how can i make my mouse click on a random white block and sleep for like 5 secs and click another random blob and sleep etc?

<{POST_SNAPBACK}>

You have 12 regions.

You'll have to make a function that defines a circular area in pixels on your screen.

You can use the random function to select a specific region (label them 1-12)

So, we have in psuedo code

```Dim \$clickX[13]
Dim \$clickY[13]

While 1
Sleep(5000)
For \$x = 1 to 12 Step 1
\$clickX[\$x] = \$clickarea[0]
\$clickY[\$x] = \$clickarea[1]
Next
\$randnumber = Random(1,12,1)
MouseClick(\$clickX[\$randnumber],\$clickY[\$randnumber])
WEnd

Local \$circle = 0
If \$center2x="" and \$center2y = "" and \$radius2 = "" then \$circle = 1
If \$circle = 1 then
; figure out circular circumference of region.  Area = pi*r^2
; put formula here
Else; we're dealing with an oval because \$circle = 0
; figure out area.  Oval area (roughly) = W*L*0.8
; put formula
Endif
; Now return the results of the formula in array format, randomized for the allowed region.
EndFunc```

Keep in mind, my loop isn't exactly perfect. As written, you'll have to define 12 separate calls for the CircularRegion function, but you can customize it further by wrapping it in a GUI and asking for user input and define everything (from the number of regions [therefore the array size and loop count])with variables. It'll drive ya nuts.

Hopefully I've planted the seed, it's up to you to make it grow.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

##### Share on other sites

hmmm well the shapes were something i randomly drew, i just want to illustrate 12 white spots on the screen, or 12 white pixels on the screen. (white being random color also), so how could i make it click on random white pixels?

##### Share on other sites

hmmm well the shapes were something i randomly drew, i just want to illustrate 12 white spots on the screen, or 12 white pixels on the screen. (white being random color also), so how could i make it click on random white pixels?

<{POST_SNAPBACK}>

Wow, well, right now you've got too many variables for me to hold in my head. If you can post another idea as to the overall PURPOSE of this script is? Is it in the context of a game? If so, which one? We may be taking the wrong approach due to lack of information. I need a little more data before I can continue as I'm a little lost in the vagueness.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

##### Share on other sites

Wow, well, right now you've got too many variables for me to hold in my head.Â  If you can post another idea as to the overall PURPOSE of this script is?Â  Is it in the context of a game?Â  If so, which one?Â  We may be taking the wrong approach due to lack of information.Â  I need a little more data before I can continue as I'm a little lost in the vagueness.

<{POST_SNAPBACK}>

Maybe rather than try to click on a randon white pixel, you should select a random pixel until the one you select is white and then wait 5 seconds.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

##### Share on other sites

just make the mouse randomly click on one of those bull things

##### Share on other sites

just make the mouse randomly click on one of those bull things

<{POST_SNAPBACK}>

Hate to be offtopic, but what game is that.

##### Share on other sites

It'd be very hard.

You have to find a certain pixel, make certain scan areas, fairly difficult.

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do \$var_"Doctor: "Don't do \$var_" - Lar.

=(

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...