Features, discussions, tips, tricks, questions, problems and feedback

Combining statements with "And" in VBScript

I have another question.

I want to create a VBSCRIPT function using AND.

But when I use AND then I get a error.

If I use multiple if statements then it works but AND would be preferable…
My code:

Sub Main()

if  Adroit.GetTag("TEST_BIT_ON_OF.value") = True  Then

if Adroit.GetTag("AUT_SEND_RCP_ON.value") = False     Then

 Adroit.SetTag ("AUT_SEND_RCP_ON.value") , true

End if
End if
End Sub


if (Adroit.GetTag("TEST_BIT_ON_OF.value") = True AND Adroit.GetTag("AUT_SEND_RCP_ON.value") = False) Then
 Adroit.SetTag ("AUT_SEND_RCP_ON.value") , True
End If

Yes, it works.

Thank you again.