Jump to content
Sign in to follow this  
dudenyc

Help With Conditional Statement!

Recommended Posts

Hello all, I've been having troubles with IF... NOT ... ELSE statement.

For Example:

**********************************

While (1)

$pos = MouseGetPos()

If $pos[0] NOT 840 Then ; <---------- problem

MouseCLick("Left", 840, 540, 1, 1)

Sleep(100)

EndIf

WEnd

********************************

How to write a proper IF ... NOT statement?

I've tried:

If $pos[0] NOT = 840 Then .... ; <-------- Did not work

Aslo tried

If NOT $pos[0] = 840 Then .... ; <-------- Did not work

Any comment is appreciated :P Thank 4 your helps.

Share this post


Link to post
Share on other sites

1

nice try for your first post

2

to place code on a posts use

[ autoit] ; no spaces

; paste code

[/ autoit] ; no spaces

3

example

While (1)
    $pos = MouseGetPos()
    ToolTip("L " & $pos[0] & " R " & $pos[1], 5, 5)
    If $pos[0] <> 840 Then
        MouseClick("Left", 840, 540, 1, 1)
    EndIf
    Sleep(100)
WEnd

4

be sure to get SciTE editor... it helps alot

8)

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