When supplied an integer (as produced by get_auto_attack()) matching a combat macro, set_auto_attack() outputs a green text "That skill couldn't be found." on the CLI and doesn't set the autoattack.
The same behavior occurs with at least some special skills. I tried various skills and while...