Ok here's the simple way to send a message straight to a contact:
var contact = Messenger.OpenChat([email address]);
//variable contact is now an official ChatWnd object
contact.SendMessage([Message or variable to send]);
//message will be sent to the friend assigned to the variable
Keep in mind, this does not send messages to people who have not been added to your contact list yet.
As far as text files, there are some code snippets at
www.mpscripts.net
However I could not get them to work.(Didn't debug the code to figure out why; could be their code or mine). You are looking for Windows Script Host functions. They deal with files and the registry and many other things Windows related. You'll find a link to the info on the functions in the Messenger Plus! Live Scripting Documentation under heading:
Objects Reference\MsgPlus Object\Properties\ScriptRegPath
Here is a direct link:
http://msdn2.microsoft.com/en-us/library/2x3w20xf.aspx
I hope it helps