What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Auto Refresh? twitter

Auto Refresh? twitter
Author: Message:
Lamonte
New Member
*


Posts: 4
Joined: Jun 2008
O.P. Auto Refresh? twitter
I'm trying to get my basic auto current twitter status in my personal message box automatically and refresh every 5 seconds, what am I doing wrong:

code:
var request = new ActiveXObject("Microsoft.XMLHTTP");
var serverResponse = "";
function getData()
{
   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.send(null);
   request.onreadystatechange = processReadyStateChange();
}

function processReadyStateChange()
{
   Messenger.MyPersonalMessage = "Twitter: Loading...";
   if(request.readyState == 4 && request.status == 200)
   {
       json = eval( request.responseText )
       Messenger.MyPersonalMessage = "Twitter: " + json[0].text
   }
}
function OnEvent_Initialize(MessengerStart)
{
    MsgPlus.AddTimer("Timer",5000); //called every 5 second
    getData()
}
function OnEvent_Timer(TimerId) {
    if(TimerId == 'Timer') {
        getData();
        MsgPlus.AddTimer("Timer",5000); //called every 5 second
    }
}
function OnEvent_Uninitialize(MessengerExit)
{
}


I couldn't find answer after searching, so I just joined :) hey everyone!
06-20-2008 12:25 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Auto Refresh? twitter - by Lamonte on 06-20-2008 at 12:25 AM
RE: Auto Refresh? twitter - by Eljay on 06-20-2008 at 12:37 AM
RE: Auto Refresh? twitter - by Lamonte on 06-20-2008 at 12:41 AM
RE: Auto Refresh? twitter - by Eljay on 06-20-2008 at 01:06 AM
RE: Auto Refresh? twitter - by Lamonte on 06-20-2008 at 01:11 AM
RE: Auto Refresh? twitter - by Lamonte on 06-20-2008 at 11:18 PM
RE: Auto Refresh? twitter - by Matti on 06-21-2008 at 06:55 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