What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help me fix my script please

help me fix my script please
Author: Message:
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. help me fix my script please
ok so i'm working on a new script that involves scraping a webpage. below is the scraping bit, along with a saveToFile function, so i can see what stuff returns.

the problem:
my xmlhttprequest is returning nothing.
the script:
code:
function OnEvent_Initialize(MessengerStart)
{
getData();
}

var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

function getData()
{
xmlhttp.open("GET", "http://shoutbox.menthix.net/forumdisplay.php?fid=39", true);
xmlhttp.onreadystatechange = stateChanged;
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  if (xmlhttp.status==200)
    {
    saveToFile(xmlhttp.responseText);
    }
  else
    {
    saveToFile(xmlhttp.status);
    }
  }
}

function saveToFile(data1)
{
var fso, f1, thePath;
fso = new ActiveXObject("Scripting.FileSystemObject");
thePath = "C:\\file.txt";
f1 = fso.CreateTextFile(thePath, true);
f1.Write (data1);
f1.Close();
}


function OnEvent_Uninitialize(MessengerExit)
{
}


the script is kinda cut and pasted together from various sources, but it looks like it should work. it's returning a readystate of 4, but an http status of zero.

help me please.
[Image: gybouserbar6hc.gif]
07-14-2006 12:14 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
help me fix my script please - by AberNStein on 07-14-2006 at 12:14 AM
RE: help me fix my script please - by luisillo on 07-14-2006 at 12:27 AM
RE: help me fix my script please - by AberNStein on 07-14-2006 at 01:07 AM
RE: help me fix my script please - by BstrdSmkr on 07-14-2006 at 01:45 AM
RE: help me fix my script please - by AberNStein on 07-14-2006 at 01:57 AM
RE: help me fix my script please - by AberNStein on 07-14-2006 at 09:00 PM
RE: help me fix my script please - by Silentdragon on 07-14-2006 at 09:42 PM
RE: help me fix my script please - by AberNStein on 07-15-2006 at 01:26 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On