Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

how to use multiple conditions with if then

$
0
0

below is my script code , _ConfirmBeforeSubmit(),  _PrintReport are the function called ,

 

$sRemark = _ConfirmBeforeSubmit()

 

                 If $sRemark <> "Is checked" Then
                      If $sRemark <> "Is not checked" Then
 ;************************************************************************************************************  
    $iTestNum += 1                                                              
        _PrintReport($iTestNum, $iTestPoint, $sRemark)  
        Return "Error: " & $sRemark
     EndIf

 

 

What i want is that the code

$iTestNum += 1                                                              
        _PrintReport($iTestNum, $iTestPoint, $sRemark)  
        Return "Error: " & $sRemark
     EndIf

should run only if both conditions i.e.

 

If $sRemark <> "Is checked"
 If $sRemark <> "Is not checked"

 

are failed, i.e. if a single condition is true then it should not run $iTestNum += 1, i do not know how to do this i have used OR operator but with that any one condition gets failed and  $iTestNum += 1 gets executed which i do not want.

please help, i will be very thankful to you

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>