Jump to content

Help to detect pixels


rakarna
 Share

Recommended Posts

Hi

i want my script to first look att the pixels (503, 498) and if it dose not detect the color i want it to detect. then i want it to search att pixels (500,498) and if it does not find the color i want it to find then i want it to start all over agen, with searching after pixels 503, 498

this is what i think is the only way i have think it maby will work :) . but if you have a better idea of how I should do this. It is welcome ;)

Link to comment
Share on other sites

You have 2 previous topics with similar question and one of them is locked for bot related.

You are here long enough to know that if you dont provide the code of what have you done-try, then no one will have interest in your problem.

So probably no one have any idea because you are not giving anything to start with.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

You have 2 previous topics with similar question and one of them is locked for bot related.

You are here long enough to know that if you dont provide the code of what have you done-try, then no one will have interest in your problem.

So probably no one have any idea because you are not giving anything to start with.

but there is no more all i want it to do is look if he can found the color on some selected positions and if he does not i want him to try agen. and i have try do search on the forum. but i do not found any things that can help me.

but i will search more :)

Link to comment
Share on other sites

here it the script

If PixelGetColor(503, 498) = 0x45323A   Then
    MsgBox(1,"ye","ohyeees i found it ;)"
Else
    MsgBox(1,"no","nop try agen")
EndIf

If PixelGetColor(500, 498) = 0x45323A   Then
    MsgBox(1,"ye","ohyeees i found it ;)")
Else
    MsgBox(1,"no","nop try agen")
EndIf

;and now when it have search and have not found i want it to do it agen.

;and now when it have found the color in the first if ore the secound if then i want it to say

MsgBox(1,"GZ","it works ;)")
Edited by rakarna
Link to comment
Share on other sites

And pay attention on third line in example from PixelGetColor on Hex usage, its related to

Return Value

Success: Returns decimal value of pixel's color.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Look in the helpfile for 'loop statements' and go on from there.

yes i did it ;):D:D:D:D

if you want to know how this is the script

do
$coord = PixelSearch( 485, 475, 523, 561, 0x1C1A1E )
If Not @error Then
$coord = 0x1C1A1E
EndIf
until $coord = 0x1C1A1E

MsgBox(1,"ohye","omg det funka!!!!!!!!")

Thank you for the tips jhonone :)

Link to comment
Share on other sites

Third line is

MsgBox(0,"The hex color is", Hex($var, 6))

The OP did use "If PixelGetColor(503, 498) = 0x45323A Then"

0x45323A isnt decimal, and the third line in help file show how to get from decimal to Hex

So it have sense :)

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

The third line is only for showing. Decimal or Hex is both just 2 different ways to write a number in code.

$i1 = 123
$i2 = 0x7B

ConsoleWrite($i1 & @CRLF)
ConsoleWrite($i2 & @CRLF)
ConsoleWrite(($i1 = $i2) & @CRLF)
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...