add write macro command