Sign in to follow this  
Followers 0
gil900

How it works?

10 posts in this topic

#1 ·  Posted (edited)

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 gil900

Share this post


Link to post
Share on other sites



?

i get

error: syntax error

If 1 = 1 Or Or
~~~~~~~~~~~~^


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

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

error: syntax error
If 1 = 1 Or Or
~~~~~~~~~~~~^

 

That error prevents the script from running, how is it working for you?

Share this post


Link to post
Share on other sites

this is AU3Check output..

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

 

nope

just syntax error

and exit

>Exit code: 2    Time: 0.418


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

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

P.S,

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

thanks

Not that I know of.

You could rename Au3Check.exe to Au3Check_Old.exe and compile a blank script to Au3Check.exe. Then it would still try to run but would always show no errors.

1 person likes this

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

thanks Matt, ingenious suggestion appreciated :)

Edited by PincoPanco

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

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