Jump to content

Recommended Posts

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 Guest
Posted

?

i get

error: syntax error

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Posted

this is AU3Check output..

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

Posted

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Posted

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.

Posted

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Posted

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.

Posted (edited)

thanks Matt, ingenious suggestion appreciated :)

Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

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
×
×
  • Create New...