The [ with ] animate <boolean_expr> context corresponds to setting the Auto Keybutton in the 3ds Max user interface. Placing an expression, operation, or block-expression within an animate on context causes keyframes to be generated whenever an animatable property of a 3ds Max object is changed, regardless of the actual state of the Auto Key button. Likewise, placing an expression within an animate off context prevents keyframes from being generated whenever an animatable property of a 3ds Max object is changed. Expressions that change an animatable property of a 3ds Max object, and are not within an animate context, will generate keyframes only if the Auto Key button is on.
Setting the animate context on or off does not affect the state of the Auto Key button. The state of the Auto Key button can be queried and set using the animButtonState global variable. The user can be prevented from changing the state of the Auto Key button using the animButtonEnabled global variable.