Jump to content
Sign in to follow this  
Guest

How it works?

Recommended Posts

Guest

If 1 = 1 Or Or Or Or Or Or Or Or Or 2 = 2 Then MsgBox(0,"","Working!!")

It really works .. I think it's a bug because it should not work .. but maybe I'm wrong :geek:

Edited by Guest

Share this post


Link to post
Share on other sites
Guest

this is AU3Check output..

but the script still working (you see the msgbox) even if there is syntax error

Share this post


Link to post
Share on other sites

gil900 is correct, you are posting Au3Check output. Try:

#AutoIt3Wrapper_Run_Au3Check=n
If 1 = 1 Or Or Or Or Or Or Or Or Or 2 = 2 Then MsgBox(0,"","Working!!")

The reason it works, is because OR will only evaluate the second expression if the first evaluates to false. For example:

If True Or ConsoleWrite("1" & @LF) Then ConsoleWrite("2" & @LF)

Will only print "2", the "1" won't be printed unless you change True to False.

Same goes for AND. The second expression is not evaluated unless the first is True.

Share this post


Link to post
Share on other sites

gil900 is correct, you are posting Au3Check output. Try:

#AutoIt3Wrapper_Run_Au3Check=n
If 1 = 1 Or Or Or Or Or Or Or Or Or 2 = 2 Then MsgBox(0,"","Working!!")

The reason it works, is because OR will only evaluate the second expression if the first evaluates to false. For example:

If True Or ConsoleWrite("1" & @LF) Then ConsoleWrite("2" & @LF)

Will only print "2", the "1" won't be printed unless you change True to False.

Same goes for AND. The second expression is not evaluated unless the first is True.

 

now yes.

Good explanation  :tv_happy:

P.S,

is there a way to set #AutoIt3Wrapper_Run_Au3Check=n permanent in SciTE?

thanks


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

To show that expression really is error if first condition is not met...

#AutoIt3Wrapper_Run_Au3Check=n

If 1 = 0 Or Or Or Or Or Or Or Or Or 2 = 2 Then MsgBox(0,"","Working!!")

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  

×
×
  • Create New...