Jump to content

Array error


Recommended Posts

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Lets go back a little and see if you can answer the question a little better.

In the code you posted, what does this do ? "If Not @error Then" ?

I know you said there is a pixel search ealier in the code , but can you tell me whay you have that line, and what it does ?

Supposingly pixel search returns two main things, an array of the x and y coords. of where the pixel was found (if found at all) OR a value called @error , in this case if the first pixelsearch did NOT come up with an error then the second pixel search was activated and aswell the code after that
Link to comment
Share on other sites

@DarkDragon, don't listen to him. He only asks this hard questions.

Click PixelSearch

PixelSearch

Thats what ive been looking at the whole time however its provided no aid mainly since the exaple doesnt have a case where the array made by pixelsearch is being used... like in a command like mouseclick
Link to comment
Share on other sites

Now we are getting some place, so you are checking that the pixel is actually found before you try to reference an array it would return, or in other words error checking.

i guess so

but once metioned before if i have to bring out the whole code which isnt that big i will... :(

Link to comment
Share on other sites

Ok, you win.

$cord=PixelSearch(133,103,888,656,0xA58A29,10,10)
If Not @error Then
MouseClick("left",$cord[0],$cord[1],1,1)
Sleep(12000)
Else
    ; ride a camel to jupiter
Endif
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

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