Jump to content
Sign in to follow this  
Guest Elijahph

PixelSearch + MouseClick problem

Recommended Posts

Guest Elijahph

Sleep(3000)

$RepeatWhile = 0

While $RepeatWhile <= 10

$coord = PixelSearch(130,205,640,538,0xA54119)

If $coord[0] == 0 Then MsgBox (0, "" "Error") EndIf

MouseClick("left", $coord[0], $coord[1])

$RepeatWhile = $RepeatWhile + 1

Sleep(5000)

WEnd

very small program but it keeps giving me errors on my coord

If $coord[0] == 0...

^

it says it isn't an array.

Share this post


Link to post
Share on other sites

Sleep(3000)

$RepeatWhile = 0

While $RepeatWhile <= 10

$coord = PixelSearch(130,205,640,538,0xA54119)

If $coord[0] == 0 Then MsgBox (0, "" "Error") EndIf

MouseClick("left", $coord[0], $coord[1])

$RepeatWhile = $RepeatWhile + 1

Sleep(5000)

WEnd

very small program but it keeps giving me errors on my coord

If $coord[0] == 0...

             ^

it says it isn't an array.

<{POST_SNAPBACK}>

Instead of $coord[0] = 0 make it

If @error Then MsgBox (0, "", "Error")

In addition use a For/Next loop instead of While/WEnd

Edited by Wolvereness

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...