Jump to content
cascadehali

Need basic help.

Recommended Posts

cascadehali

While 1
if ((PixelSearch 939,525,973,551, 0xFE4040, 3, Fast rgb) = True) Then
   Click
WEnd

Need to loop this constantly, however it says While doesn't have a matching statement WEnd, and if statement is missing a bracket somewhere.

Share this post


Link to post
Share on other sites
Bowmore

Check the help file for correct syntax

While 1
    if ((PixelSearch 939,525,973,551, 0xFE4040, 3, 1) = True) Then   ;<================
        Click
    EndIF ;<===========================
WEnd

 


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites
Jos
Posted (edited)
2 hours ago, cascadehali said:

Need to loop this constantly, however it says While doesn't have a matching statement WEnd, and if statement is missing a bracket somewhere.

There is much wrong with those lines. On top of what Bowmore stated, the syntax for Pixelsearch() is wrong too as the bracket is in the wrong place!
Click is not a functions so is invalid too.
Use au3check to help you better getting the syntax fixed and/or read the helpfile.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

×