I have no experience with Jscript so I'm struggling quite a bit, and would love some help
Basically I'm making a window with 3 listviews (I would love for it to be one with three columns, but I just cant get it to work), they display different elements of a certain XML file (I generate it via other means).
Anyways, here is what I made so far, I downloaded a few scripts and tried to copy what they where doing, but it didint work out as planned hehe.
code:
function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_Uninitialize(MessengerExit)
{
}
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
function loadXML(xmlFile)
{
xmlDoc.async="false";
xmlDoc.onreadystatechange=verify;
xmlDoc.load(xmlFile);
xmlObj=xmlDoc.documentElement;
}
function OnEvent_MenuClicked (MenuItemId, Location, OriginWnd)
{
// Captures when the user clicks on the 'WLMBb' menu
if (MenuItemId=="Manage") fillTable();
}
function onTareasEvent_CtrlClicked (PlusWnd, ControlId)
{
if (ControlId == "Refresh")
{
fillTable();
}
}
function fillTable()
{
// Opens the window and loads the tasks from the XML file.
var Manage = MsgPlus.CreateWnd("Interface.xml", "Manage");
loadXML('C:\\Program Files\\Messenger Plus! Live\\Scripts\\wlmbb\\tasks.xml');
TaskList = xmlObj.getElementsByTagName("tasks")[0].getElementsByTagName("task");
IntTaskList = TaskList.lenght
for (IntCurrentTask = 0; IntCurrentTask < IntTaskList; IntCurrentTask++)
{
CurrentTask = xmlObj.getElementByTagName("tasks")[0].getElementsByTagName("task")[IntCurrentTask];
IntId = 0;
Manage.LstView_AddItem("ListViewName", CurrentTask.getElementsByTagName("name")[0].text, IntId++);
Manage.LstView_AddItem("ListViewExpiration", CurrentTask.getElementsByTagName("name")[0].text, IntId++);
Manage.LstView_AddItem("ListViewCourse", CurrentTask.getElementsByTagName("name")[0].text, IntId++);
}
}
And here is an example of the XML it should read:
code:
<?xml version="1.0" encoding='UTF-8'?>
<tasks>
<task id="1">
<name>nameofthistask1</name>
<expiration>may 21 2010</expiration>
<course>nameofthiscourse1</course>
</task>
<task id="2">
<name>somethingelse</name>
<expiration>may 22 2010</expiration>
<course>Cooking class</course>
</task>
<task id="3">
<name>listview</name>
<expiration>may 23 2010</expiration>
<course>scripting</course>
</task>
<task id="4">
<name>WLMBb</name>
<expiration>mayo 24 2010</expiration>
<course>coolstuff</course>
</task>
</tasks>
I would really appreciate if you guys could help me, I already made a program that does all of this in c#, but I wanted to surprise my teacher with a program that runs directly on messenger (since the purpose of this script is to share information between us, something we do in messenger a lot).
Thanks in advance.