This script marks the selected messages as replied to:
using terms from application "Mail" tell application "Mail" set selectedMessages to selection repeat with eachMessage in selectedMessages -- set was replied to of eachMessage to false set was replied to of eachMessage to true end repeat end tell end using terms fromFor marking as unreplied, I used the brain-dead solution of simply creating a second script which is identical with the exception of substituting the value false into the set was replied to line, as demonstrated by the commented line which starts with --. Save the two versions of the script to one of the above folders.
Now you should see whatever name you chose for your scripts available from the AppleScript menu. (Assuming you have the AppleScript menu enabled.)
[robg adds: Mail should automatically track reply status for messages, and if you're using IMAP, that information should appear on all your Macs. However, I have seen Mail get confused in the past and lose the reply status on certain messages. The above script provides a simple fix for those times.]

