Jump to content

How to search for a color!


Recommended Posts

How do i search for a color In a specific Spot

I tried:

If; Searchign for the crack.
PixelSearch(851, 256, 0x0f0808)
    Then
    MsgBox(0, "YOU GOT A CRACK" ); When it reaches en
Else
    $User + 1
    $Pass + 1
    Logon()

Help :( ( Im making a bruteForcer for world of warcraft if anyone wants to know :P )

MY ERROR: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Hazza\Desktop\Autoit3\CRACKER.au3"

C:\Users\Hazza\Desktop\Autoit3\CRACKER.au3 (40) : ==> "If" statements must have a "Then" keyword.:

If

???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

>Exit code: 1 Time: 0.209

Edited by Maxisking
Link to comment
Share on other sites

i'm not quite sure what you're asking.

$crack is defined by the PixelGetColor command. look it up in the autoit help file for a better description.

whatever the pixel color is at the moment that $crack = PixelGetColor (851, 256) is run by the script gets saved to the $crack variable for use whenever you recall it (which happens to be immediately after with If $crack = 0x0f0808 then). If the variable matches the hex code set by you, then you can have it do what you want.

sorry that i might not be completely clear in my explanation, i'm watching a move now :S

Link to comment
Share on other sites

Ok, so would i of have to Predefined $Crack up the top with the color?

No, the problem with your code is just how you've set it out..

This:

If; Searchign for the crack.
PixelSearch(851, 256, 0x0f0808)
    Then
    MsgBox(0, "YOU GOT A CRACK" ); When it reaches en
Else
    $User + 1
    $Pass + 1
    Logon()

Should look like this:

PixelSearch(851,256,100,100,0x0f0808);change '100' to whatever size you want
If @error <> 1 Then;if pixel is found...
    MsgBox(0,"", "YOU GOT A CRACK" )
Else
    $User += 1
    $Pass += 1
    Logon()
EndIf

I guess you've defined $user and $pass earlier in your script.

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

Yep up the top. I reliased that i needed to got += .

Thankyou andy and thankyou everyone else. will test this now : )

Func CheckLogin()
$LOGON = PixelGetColor (851, 256)

If $LOGON = 0x0f0808 then
MsgBox(0,"You Has A crack","You Have A crack")
Else
 $User += 1
 $Pass += 1
 Logon()
EndIf
EndFunc

Would this work or do i need to use your method andy?

Link to comment
Share on other sites

Would this work...

Not sure about these lines:

$LOGON = PixelGetColor (851, 256)
If $LOGON = 0x0f0808 then

From the help file:

PixelGetColor

Success: Returns decimal value of pixel's color.

try this instead:

$LOGON = PixelGetColor (851, 256)
If Hex($LOGON,6) = "0f0808" then

Not tested but should work.

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

$LOGON = PixelGetColor (851, 256)

If $LOGON = 0x0f0808 then

works in this form fine, i have a few scripts based on this.

Cool, I'll take your word for it.

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...