Status when Resolving Ticket

It seems like the process RT goes through on ticket resolution is to first put the comment on the ticket and then change the status to resolved. Seems like 2 separate steps.

We have the comment being sent to Admin CCs, but we’d like to only send that if the status is NOT being changed to resolved. Any tips on changing the scrip condition to check whether the new status is “resolved” before sending the comment? Is there a $Ticket->NewStatus vs $Ticket->OldStatus? Even if there was, it seems like RT’s process has this as 2 separate steps (send comment and then change status separately) - any thing we can do here?