Why do you need a script to mark a file as watched? On Plex and XMBC you can easily toggle a file's watched/unwatched status from the navigation interface.
I store this watched status on a server that other people created. It is used to collect statistics of how many people watched a particular file. It also allows me to see what files I've already watched as I use multiple devices.