Sign in to follow this  
Followers 0
jougan

conditional statement with multiple statements

3 posts in this topic

I'm trying to make a script that will check the color at a position and if its not black, than it will delay and send a key.

If PixelGetColor(320,283) Not = 0 Then Sleep(100)

And Send("{DOWN}")

When I try to run this it says "Invalid keyword at the start of this line" in regards to And.

If I try to put Send on the same line as Sleep, it tells me "Illegal text at the end of statement (one statement per line)"

It works fine until I put in the Sleep, so idk. Thanks for any help

Share this post


Link to post
Share on other sites



If <condition> Then
  <statement>
  <statement>
  <statement>
  ...
Endif

I suggest you read some of the help if you don't know the syntax :whistle:


----[ SandyD ]---

Share this post


Link to post
Share on other sites

Ok thanks that worked. Never heard of Endif :whistle: I did look in Help I guess i just kinda ignored the example.

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  
Followers 0