What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request] email message subject to nick or psm

[request] email message subject to nick or psm
Author: Message:
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. [request] email message subject to nick or psm
can someone please write me a script that will take the subject (and maybe the text) of the newest message from a webmail service and make it my nickname or psm?
i'll be autoforwarding my spamoetry from gmail to another email account, so it doesn't matter what email service this is written for, so long as it's free to sign up. maybe a disposable email service with rss? i dunno.
i might give this another stab, but it feels quite out of my league, programming-wise.

thanks.

This post was edited on 09-22-2006 at 10:05 PM by AberNStein.
[Image: gybouserbar6hc.gif]
09-22-2006 10:00 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: [request] email message subject to nick or psm
Gmail has a ATOM feed to check for new e-mails, you could use that.

http://mail.google.com/mail/feed/atom

But I'm not sure how to get the cookie set that shows you are logged in.

EDIT: Little Mistake it's not an RSS Feed but ATOM.

This post was edited on 09-22-2006 at 10:08 PM by Ezra.
[Image: 1-0.png]
             
09-22-2006 10:04 PM
Profile PM Web Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. RE: [request] email message subject to nick or psm
and just mod the rss reader script? i'll check it out
[Image: gybouserbar6hc.gif]
09-22-2006 10:06 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: [request] email message subject to nick or psm
Yeah, or just write your own code to parse the message, isn't that hard.

I found out something that might help you. The Httprequest can accept username and password.

Use that to download the atom file to your computer, after that use the MSDOM parser to parse the subject messages.

code:
function httptest()
{
  var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  xmlhttp.Open("GET", "https://mail.google.com/mail/feed/atom", false, "username", "password");
  xmlhttp.Send();
  var Text = xmlhttp.responseText;
  //XML Object = xmlhttp.responseXML;
  Debug.Trace(Text);
}

That works :D, tested it :o

This post was edited on 09-22-2006 at 10:22 PM by Ezra.
[Image: 1-0.png]
             
09-22-2006 10:13 PM
Profile PM Web Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. RE: [request] email message subject to nick or psm
ooh that looks promising
i'll try that
the only thing is gmail truncates the bodies of the emails in the feed.
i'll have to scrape the page itself.

edit: here's what i'm currently using.
when i want to change my nick i just type /script httptest

double edit: holy shit i'm an idiot.

code:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Signin(eml){
httptest();
}

function rndm(length)
{
    var randNum= Math.floor(Math.random()*length);
    return randNum;
}

function httptest()
{
  var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  xmlhttp.Open("GET", "https://mail.google.com/mail/feed/atom/spam", false, "username", "password");
  xmlhttp.Send();
  var Text = xmlhttp.responseText;
  var entries = Text.split("<entry>");
  var k = rndm(entries.length);
  var title = entries[k].substr(7,entries[k].indexOf("</title>")-7);
  var summary = entries[k].substr(entries[k].indexOf("<summary>")+9,entries[k].indexOf("</summary>")-entries[k].indexOf("<summary>")-21);
      Messenger.MyName = title;
      Messenger.MyPersonalMessage = summary;
  }

function OnEvent_Uninitialize(MessengerExit)
{
}


This post was edited on 11-02-2006 at 04:00 AM by AberNStein.
[Image: gybouserbar6hc.gif]
09-22-2006 10:21 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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