RT_System - Status changed from resolved to open

I created a condition and action which become a scrip. This scrip
automagically modified a ticket’s status to resolved whenever the ticket
owner replied. (most of our tickets are resolved in one response) The scrip
works fine, but in the ticket history, it shows up like this:

Wed Oct 23 11:15:05 2002 RT_System - Status changed from new to resolved
Wed Oct 23 11:15:05 2002 adminuser - Correspondence added [Reply] [Comment]

     // correspondence

Wed Oct 23 11:15:05 2002 RT_System - Status changed from resolved to open

I recognize that the problem is that RT automatically re-opens a resolved
ticket on any response. Now, is there any way to force my scrip to wait a
second or two so that when it resolves the ticket, RT_System won’t re-open
it right away?