Jump to content

Pixel Search help.


 Share

Recommended Posts

So Im making a bot in wow (I know:))

Anyways what this script is doing is moving back and forth and checking a region for red pixels. unfortunatley it doesn't work.

do

controlsend("World of Warcraft", "", "", "{UP}")

sleep(9000)

controlsend("World of Warcraft", "", "", "{DOWN}")

sleep(9000)

$coord = Pixelsearch( 546, 460, 100, 100, 0xCE0F01, 20, 2 )

if not @error then

sleep(100)

MsgBox(0, "found", "Abled" )

Sleep(10)

mousemove( $coord[0], $coord[1], 2 )

sleep(100)

mouseclick( "left" )

ExitLoop

EndIf

sleep(3000)

until $check = 0

I can not figure out why It wouldnt be working, except for maybe I have it searching in the wrong area.

Please help:(

Link to comment
Share on other sites

546, 460, 100, 100...??????

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

maybe....

100, 100, 546, 460

???

8)

I want the box it searches in to start from (546, 460) though, wouldnt having the 100's first start it at (100, 100)

?

Link to comment
Share on other sites

I think what he was trying to point out,if im not mistaken is that pxelsearch only goes top to bottom and left to right so your giving it arguments it cant use.if you want to start at 546,460 you can only search from that point on to the right and bottom.

http://www.autoitscript.com/forum/index.ph...;hl=pixelsearch

This may help us more visual learners,some of use need a visual along with the explanation in order to understand a subject fully.So your first two coordinates in pixelsearch() are your starting x,y and the second coordinates are your finishing coordinates,and since pixelsearch only goes left to right,top to bottom your use was trying to use it in revers,or basically you told autoit to look for a pixel in a way/place it didn't/couldn't understand.Hope this helps and that you understand my remarks :P

Link to comment
Share on other sites

I think what he was trying to point out,if im not mistaken is that pxelsearch only goes top to bottom and left to right so your giving it arguments it cant use.if you want to start at 546,460 you can only search from that point on to the right and bottom.

http://www.autoitscript.com/forum/index.ph...;hl=pixelsearch

This may help us more visual learners,some of use need a visual along with the explanation in order to understand a subject fully.So your first two coordinates in pixelsearch() are your starting x,y and the second coordinates are your finishing coordinates,and since pixelsearch only goes left to right,top to bottom your use was trying to use it in revers,or basically you told autoit to look for a pixel in a way/place it didn't/couldn't understand.Hope this helps and that you understand my remarks :P

Omg thank you so much, now i get what it does, got it to work! Thanks for the fast replys:)
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...