Sign in to follow this  
Followers 0
Maxisking

How to search for a color!

14 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



It would look something like this:

$crack = PixelGetColor (851, 256)

If $crack = 0x0f0808 then

Else

Endif

There are many different ways to do this, i happen to have 6-7 self written bots for wow =)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

In that case, do you think you could run over my code?

Share this post


Link to post
Share on other sites

what exactly are you trying to do?

i wasn't too clear on the:

Then

MsgBox(0, "YOU GOT A CRACK" ); When it reaches en

Else

$User + 1

$Pass + 1

Logon()

Share this post


Link to post
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!

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

what exactly is a brute forcer anyhow?

i'm (unfortunately) too familiar with wow, however i'm not familiar with that term.

Share this post


Link to post
Share on other sites

A Cracker, it tries heaps of logins to a link to try steal other peoples accounts :P

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

kk thx andy, got msn ?

Share this post


Link to post
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.

also not exactly sure if i'm too hip on the intentions of this script, so i suppose my help ends here D=

Share this post


Link to post
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!

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