Sign in to follow this  
Followers 0
faustf

if and and with some choice

4 posts in this topic

hi guy

i try  to do  a  cycle  like  this    if    $variable=''  and $variable1=''  and $variable3='' then  ......

but  dont  go ,  i try  to follow  the  post

'?do=embed' frameborder='0' data-embedContent>>

 

i insert  (   but  have  this  error    Missing right bracket ')' in expression.:

someone  can  write  some  example  ,  for  if  and  for  case?'

thankz  so mach  :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I notice in that topic you link to, that there is indeed a missing bracket in Post #5

If ($title = "Mozilla Firefox Setup " And $TextLine[8] = "C:\Program Files\Mozilla Firefox\" Or & _
    ($title = "Mozilla Firefox Setup " And $TextLine[8] = "C:\Program Files (x86)\Mozilla Firefox\") Then

should be

If ($title = "Mozilla Firefox Setup " And $TextLine[8] = "C:\Program Files\Mozilla Firefox\") Or & _
    ($title = "Mozilla Firefox Setup " And $TextLine[8] = "C:\Program Files (x86)\Mozilla Firefox\") Then

notice the bracket before the 'Or' that was missing.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

o yhankz  i understund  :)

Share this post


Link to post
Share on other sites

If you are testing multiples of one single element, then you don't need any brackets.

If $val = 1 or $val = 2 or $val = 3 Then
    "do something here"
EndIf

But if you are using more than one element anywhere, then you need brackets.

If ($val > 0 And $val < 3) or $val = 4 Then
    "do something here"
EndIf

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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