Jump to content

PixelSearch


Recommended Posts

Please could anyone explain me how to set up pixelsearch propelly ? like how to find the top right etc coords ? I know theres a tool with autoit for finding coords but i dont know which a which so anyone please could guide me trought ?

PixelSearch ( left, top, right, bottom, colour [, shade-variation [, step [, hwnd]]] )

Link to comment
Share on other sites

go to the folder of AutoIT and you should see a program, with the name: Au3Info.exe

click that -> then there is tab's for click on mouse and you should now see,

position: cursor and color, then you can go for summary for extra info,

and also there is a finder tool you click-Hold the icon and point ur

mouse to an object you want information on.

hope that helped,

/KiRo

Edited by Kiroshi
Link to comment
Share on other sites

It cannot be explained any better than the help file.

left = top x coord of area to search

Top = top y coord of area to search

Right = bottom x coord of area to search

Bottom = bottom y coord of area to search

I cannot think of another wa to explain the other params

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

HotKeySet("{F4}", "ExitProg") 
HotKeySet("{F3}", "StartProg") 

While 1
Sleep(100) 
Wend

Func StartProg()
while 1
    PixelSearch(1523 ,23 ,1532 ,518 ,0xFFF00)
    If @error = 0 Then
        MouseClick("left",1048,729,1,0)
        Sleep(500)
    Else
        PixelSearch(1523 ,23 ,1532 ,518 ,0x8000FF)
        If @error = 0 Then
        WinActivate("Bez názvu – Poznámkový blok")
        Send("LOL")
        EndIf       
    EndIf
WEnd
EndFunc


Func ExitProg()
Exit 0 
EndFunc

As i sayd i am trying to search only certrain area but it does not work :)

I dont get any errors it just searches bad area

Btw is there way at Else instead of doinf Send("Lol") to start some second function ?

Edited by ForsakenGod
Link to comment
Share on other sites

You say it dosent work, but what exactly is happening ?

Try this to test if you are finding your colour

#include <Array.au3>

;HotKeySet("{F4}", "ExitProg")
HotKeySet("{F3}", "StartProg")

While 1
    Sleep(100)
WEnd

Func StartProg()
    While 1

        $pixel = PixelSearch(1523, 23, 1532, 518, 0xFFF00)
        _ArrayDisplay($pixel)
    Wend    
EndFunc
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Well the problem was that i didnt relize that infinite loop may cause the failure : / Basically it just searched searched and didnt tar the window i ve fixed it now yuppey ;) JohnOne have you ICQ , Skype or so ? :) I would be really gratefull if you could help me

Edited by ForsakenGod
Link to comment
Share on other sites

It would be best for you to take AutoIt 1 2 3. It is a class that will teach you the basics. Takes a couple of hours depending on how fast you pick it up. If you do this, many of your basic questions will be answered, saving you much time in the long run. Link to it is in my signature.

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...