Custom scrip action to set ticket status and autoreply to requestors

Hello,

I would like to build a scrip that on condition “repoen”, autoreplies
to the requestor, and changes the status of the ticket back to its
former status.

Is there a way to do this? I think I’ve located a way to set the
status back, but how can I perform an autoreply using the template
specified?

Thanks,

Adam