Jump to content
Sign in to follow this  
ForsakenGod

PixelSearch

Recommended Posts

ForsakenGod

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]]] )

Share this post


Link to post
Share on other sites
Kiroshi

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

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
Share on other sites
ForsakenGod

THe problem is when i set up autoit by that it just does not search the area i want : / damn

Share this post


Link to post
Share on other sites
Kiroshi

does it give any ERRORs ?

Share this post


Link to post
Share on other sites
ForsakenGod

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

Share this post


Link to post
Share on other sites
jvanegmond

ForsakenGod, keep your questions about one particular topic in one thread.

http://www.autoitscript.com/forum/index.php?showtopic=105546

Edited by Manadar

Share this post


Link to post
Share on other sites
ForsakenGod

I am sorry for that would del this one if i could but i am really confused spend so mutch time on it and it does not work : /

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
Share on other sites
ForsakenGod

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

Share this post


Link to post
Share on other sites
ForsakenGod

Anyone knows if i can stop one function and start some other when its in loop ? Like look in my code in above post.

Like after

If @error = 0 Then
        WinActivate("Bez názvu – Poznámkový blok")
        Send(" Najdena Zlta ")

I would like to stop loot and let the second function begin is there some way ?

Share this post


Link to post
Share on other sites
Bert

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.

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  

×