Jump to content

VBScript to AutoIT using AND


fcjoe
 Share

Recommended Posts

Function IsAccountDisabled(intUAC)
    Const ADS_UF_ACCOUNTDISABLE = 2
    If intUAC And ADS_UF_ACCOUNTDISABLE Then
        IsAccountDisabled = True
    Else
        IsAccountDisabled = False
    End If
End Function

I have a VBScript that I'm converting to AutoIT. What it does is query Active Directory for all accounts and doesn't count the ones that are disabled. The function in VBScript to to determine if it is disabled is below

' Function to perform an AND comparison against the AD field UserAccountControl to determine if the account is disabled

Function IsAccountDisabled(intUAC)

Const ADS_UF_ACCOUNTDISABLE = 2

If intUAC And ADS_UF_ACCOUNTDISABLE Then

IsAccountDisabled = True

Else

IsAccountDisabled = False

End If

End Function

It will return True is the account is disabled. However, VBScript and Autoit treet 'AND' differently. Does anyone know how to get this to work in AutoIt?

Thank you,

Joe

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...