Here's the script itself to mark items as complete.