If you search on diylightanimation for Xlights 2011c, there is a small note on using a custom script in Xlights (it's #5)... I use it to run a .bat file to change my scrolling led sign (shows song now playing and artist) and send RDS data... This is what #5 says...
There is now an EXEC command available when using scripts. This runs an operating system command. So if you want to write the name of the currently playing sequence to a text file, select Playlist > Custom Script from the xScheduler menu. Then you can do something like on line 225:
220 PRINT "Playing:",ITEMNAME$(NextItem)
225 EXEC "CMD /C ECHO " + ITEMNAME$(NextItem) + " >c:\nowplaying.txt"
230 PLAYITEM NextItem
I can attach what I'm using if you need more info... Hope this helps

Dan