you might want to look at /notify and on notify to do that without making a text file

/help notify
/help on notify