How can you do compound boolean statements in AppleScript? For example

    on run {input, parameters}

    set Variable1 to "5"

    if (Variable1 is not "5") &amp; (Variable1 is not "6") then

        display dialog "Variable1 is not 5 or 6"

    else

        display dialog "Variable1 is 5"

    end if


    return input
end run


When running this program, I get the error:


  Can’t make {false, true} into type boolean.
The following should handle the test:

set Variable1 to "5"

if (Variable1 is not "5") and (Variable1 is not "6") then
    display dialog "Variable1 is not 5 or 6"
else
    display dialog "Variable1 is " &amp; Variable1
end if