Sign in to follow this  
Followers 0
XHD

Having trouble utilizing pixelclick to my needs

4 posts in this topic

So I'm starting from scratch again and would appreciate any advice or help in this matter. Here is what I am trying to do:

I have a grid (size not predetermined, but will probably be around 10x8) where each block can be any color in the spectrum. I want the mouse to go through a series of clicks based around the first block in the grid, that is however until the block turns black, then I want the cursor to move to the next block and continue doing the same series of clicks, but oriented around the origin of the second block. I need the cursor to do a color check before each click, and if it returns black as true then to end the clicking process and immediately move onto the next block.

I'm not very proficient in coding but over the years I've gotten by through trial and error, however this script has been kicking my ass for the past week now. I imagine I need an array of some sort with the origins of each block, with the main process using x for where to begin, and the following series of clicks working off the origin of the block (so each click would be say "-200, 50" from the origin of the block)

I hope I explained this well enough, English is my second language so I may be off with the terminology or left something out.

Any help would be greatly appreciated. I do not have paypal but if someone could even go as far as to make the script for me (i can change the number of clicks and screen positions easily enough my self) I will do what I can to give you something for your troubles, thank you in advance ;)

Share this post


Link to post
Share on other sites



Welcome to the forum.

First, just to let you know, offering cash here is a bad idea. We rather teach you how to fish instead of giving you a fish.

Second, you will need to post your code so we can see what you have tried, and help you fix it.

Third, please beware if what you are asking for is for a game bot, please review the announcement concerning bots.

Thanks, and welcome to the forum.

Share this post


Link to post
Share on other sites

Ok, I was just trying to be polite by offering something for someones time. No this is not for a game, more of a automated mathematical equation, but without the use of AutoIt's equation functions. I have no advanced code currently, but this is the base script I've been using for a single block on the grid to test the clicks in correspondence to the buttons. When you right click on the blocks, a radial menu with four buttons pops up, this base script goes through and clicks on each button and closes the information window they open (the final script wont click on each button but I can change that later), also this script currently uses the upper left corner of the screen as the origin, however I need it to use the origin of each block or create an array with the actual positions of each mouse click on the grid.

$a = 1
while $a = 1
sleep(1000)
MouseClick("right", 300, 597)
sleep(500)
MouseClick("left", 380, 543)
sleep(500)
MouseClick("left", 1912, 13)
sleep(500)
send("{ENTER}")
sleep(500)
MouseClick("right", 300, 597)
sleep(500)
MouseClick("left", 400, 600)
sleep(500)
MouseClick("left", 1912, 13)
sleep(500)
send("{ENTER}")
sleep(500)
MouseClick("right", 300, 597)
sleep(500)
MouseClick("left", 374, 655)
sleep(500)
MouseClick("left", 1912, 13)
sleep(500)
send("{ENTER}")
sleep(500)
MouseClick("right", 300, 597)
sleep(500)
MouseClick("left", 305, 665)
sleep(500)
MouseClick("left", 1912, 13)
sleep(500)
send("{ENTER}")
sleep(6000)
wEnd

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

this will watch a location that u chose untell the color changes then it will do what ever u tell to to after it changes.

its not exactly what your looking for but it could be modded for what u need. i think u may need to turn it into a func so u can rename it and call it in sequance with the blocks u need clicked.

Local $PixelCheck, $NewCheck
$PixelCheck = PixelCheckSum(325, 725, 327, 727); location of color being watched
While 1                                        ; Keep going
    $NewCheck = PixelCheckSum(325, 725, 327, 727)
    If $PixelCheck <> $NewCheck Then
        ;;;;;;;;;;;;;;;;;;;;;;;;
                ; ADD MOUSE CLICK HERE FOR this BLOCK is watching so it can turn black
                ;;;;;;;;;;;;;;;;;;;;;;;;
        ; The old pixel checksum and the new one are different.
        $PixelCheck = $NewCheck; Update the $PixelCheck to the new value
        ; Let us now it has changed.  Change this to what you want to happen when the colour in the region changes.
        ;;;;;;;;;;;;;;;;;;;;;;;;
                ; ADD MOUSE CLICK HERE FOR NEXT BLOCK you need to watch
                ;;;;;;;;;;;;;;;;;;;;;;;;
    EndIf
    Sleep(300); Just to give the CPU a bit of a break.
Wend

not sure if it will but i hope it helps

and the faq at the top of this page will have alot of answers

Edited by 84cr250

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0