This is a temporary solution until I can put an interface around it.
js code:
var oContacts = {};
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage)
{
var m = /^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage);
if (m)
{
var Command = m[1].toLowerCase();
var Param1 = m[2];
if (Command === 'sname' || Command === 'spsm')
{
for (var oContact = new Enumerator(Messenger.MyContacts); !oContact.atEnd(); oContact.moveNext()
{
oContacts[oContact.item().Email] = (Command === 'sname' ? oContact.item().Name : oContact.item().PersonalMessage);
}
Debug.DebuggingWindowVisible = true;
Debug.ClearDebuggingWindow)();
WordWheelSearch(Param);
return '';
}
}
}
function WordWheelSearch(sString)
{
if (typeof sString === 'undefined') sString = '';
for (var oContact in oContacts )
{
if (oContacts[oContact].indexOf(sString) !== -1 && sString !== '' )
{
Debug.Trace (oContact)
}
}
}
The way you would use it is by doing this
/sname this test or /spsm this project