Guest Posted March 26, 2014 Share Posted March 26, 2014 (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 Edited March 26, 2014 by Guest Link to comment Share on other sites More sharing options...
Gianni Posted March 26, 2014 Share Posted March 26, 2014 ? i get error: syntax error If 1 = 1 Or Or ~~~~~~~~~~~~^ Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2014 Share Posted March 26, 2014 this is AU3Check output.. but the script still working (you see the msgbox) even if there is syntax error Link to comment Share on other sites More sharing options...
Palestinian Posted March 26, 2014 Share Posted March 26, 2014 error: syntax error If 1 = 1 Or Or ~~~~~~~~~~~~^ That error prevents the script from running, how is it working for you? Link to comment Share on other sites More sharing options...
Gianni Posted March 26, 2014 Share Posted March 26, 2014 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 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Mat Posted March 27, 2014 Share Posted March 27, 2014 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. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Gianni Posted March 27, 2014 Share Posted March 27, 2014 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 P.S, is there a way to set #AutoIt3Wrapper_Run_Au3Check=n permanent in SciTE? thanks Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
JohnOne Posted March 27, 2014 Share Posted March 27, 2014 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!!") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Mat Posted March 28, 2014 Share Posted March 28, 2014 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. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Gianni Posted March 28, 2014 Share Posted March 28, 2014 (edited) thanks Matt, ingenious suggestion appreciated Edited March 28, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now