Lamonte
New Member
Posts: 4
Joined: Jun 2008
|
O.P. RE: Auto Refresh? twitter
Blah I fixed it my self:
code: //cleanscript.com
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.AddTimer("Timer",60000); //called every 5 second
getData()
}
function OnEvent_Timer(TimerId) {
if(TimerId == 'Timer') {
getData();
MsgPlus.AddTimer("Timer",60000); //called every 5 second
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function getData()
{
var request = new ActiveXObject("Microsoft.XMLHTTP");
var serverResponse = "";
var TYPE = "GET"; //use GET to request information and POST to send information
var URI = "http://twitter.com/statuses/user_timeline/__XD__.json"; //whatever server and or form you want to communicate with
var ASYNC = true; //if false script will pause until the request is complete
request.open(TYPE, URI, ASYNC);
request.onreadystatechange = function (){
Messenger.MyPersonalMessage = "Twitter: Loading...";
if(request.readyState == 4 && request.status == 200)
{
json = eval( request.responseText )
Messenger.MyPersonalMessage = "Twitter: " + json[0].text
}
}
request.send();
}
Thanks me
This post was edited on 06-20-2008 at 11:19 PM by Lamonte.
|
|