Shoutbox

Myspace Message Notifier - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Myspace Message Notifier (/showthread.php?tid=66445)

Myspace Message Notifier by IamFroggy on 09-19-2006 at 08:38 PM

Hi there guys just made this script; I thought I'd release it here and if it pans out fine submit it to the database;

What it is is a myspace Event notifier; It will notify you of messages , comments etc in a little toast with a sound playing;

Any comments, suggestions et all are most welcome; I have done some basic testing and such to make sure it works...

I made this script because I loved the notification message feature  of the myspace IM, but thought the program itself was ugly, clunky and well , another  program I had to waste memory on .

*Edit - 22-9-06 uploaded version 0.04
Added version number to about box
Added option to play sound or not
Added option to choose which file to play , if no sound is chosen default 
sound played.

Credit: File dialog code was found on a forum here and I believe its taken from Choli's Translater Script,I believe its pretty standard code to open dialogboxs but full credit is given in the .js file

*

*Edit - 20-9-06 uploaded version 0.03 , bugfix*


RE: Myspace Message Notifier by Spunky on 09-19-2006 at 08:54 PM

Just donwloaded and imported to have a look at the code... Is this script secure? Theres not gonna be any way that someone can get my password? (Apart from it being saved in a text file :S)

Could the line

code:
xmlhttp.open("POST","http://login.myspace.com/index.cfm?fuseaction=login.process",true)
not be changed to
code:
xmlhttp.open("POST","https://login.myspace.com/index.cfm?fuseaction=login.process",true)

I don't know if a lot of people will feel comfortable running a script that uses their password for an external site as MP!L warns that scripts have the same capabilities as an .exe file (even if they don't :p)

I also changed the files name from using MyEmail to MyUserID... (Mainly because I hate having files which are classified as having more than one extension as they usually get picked up by anti-virus programs and firewalls as possibly containing harmful code (I used to have a folder called "R.E.M" and even that was suspected :p)
RE: Myspace Message Notifier by saralk on 09-19-2006 at 09:01 PM

When you login to MySpace, its over a http connection, not a https connection, so there would be no added security benefits


RE: Myspace Message Notifier by IamFroggy on 09-19-2006 at 09:03 PM

Hi , thanks for taking a look;

The password is saved in a text file; I know that might be a security risk and I thought maybe if people like the script I would encode it in some way to prevent casual snooping, my logic was that if someone could get on your machine to snoop a file and read it , then you would have bigger security problems :)

I'm affraid that you could not post to https , as myspace does not support that.

If you look at the actual myspace login its a form that posts to the very same url that this script uses, my method of submitting user details is no more insecure than that :)



quote:
Originally posted by saralk
When you login to MySpace, its over a http connection, not a https connection, so there would be no added security benefits




Yup yup
RE: Myspace Message Notifier by Spunky on 09-19-2006 at 09:10 PM

My mistake... I thought I saw a page before that told you to check for "https" in the address bar :$ (Don't know where I saw that then now and it's gonna bug me like hell! :p)

Had an alert saying I had a "Birthday Reminder", but it filled the whole toast with text... (repeating the same words over and over) Also, there should be an option to turn of the alert once it's been shown once.

Encrypting the file would be no good would it? The encryption method would be readable by the user by going to the edit script window... Just reverse it

For all intentional purposes the script appears to work fine (Y):D


RE: RE: Myspace Message Notifier by IamFroggy on 09-19-2006 at 09:19 PM

quote:
Originally posted by SpunkyLoveMuff
My mistake... I thought I saw a page before that told you to check for "https" in the address bar :$ (Don't know where I saw that then now and it's gonna bug me like hell! :p)

Had an alert saying I had a "Birthday Reminder", but it filled the whole toast with text... (repeating the same words over and over) Also, there should be an option to turn of the alert once it's been shown once.

Encrypting the file would be no good would it? The encryption method would be readable by the user by going to the edit script window... Just reverse it

For all intentional purposes the script appears to work fine (Y):D


Encrypting the file would stop casual browsers of a machine just seeing the password from browsing the file which would be something :)

I have tested the script on new message functionality , but its not been tested  for all the other events , because i couldn't mock those up to test, but any errors i'm sure will be easy to nail done.

You've hit one large limitation of the script, because it works by scaping your profile home page (myspace has no api) , theres no way to know if a new message found is an old one thats already been alerted or a new one , so the script HAS to keep alerting until myspace reports no new messages , ie  you check your messages.
RE: Myspace Message Notifier by Spunky on 09-19-2006 at 09:20 PM

You could write a setting to file (or registry) if when an alert is displayed. Then delete it again when the script says there are no messages on myspace...


RE: Myspace Message Notifier by IamFroggy on 09-19-2006 at 09:23 PM

the script should stop alerting once  you have read all your new messages, not keep alerting when there no new messages , it used to do that  ( for no reason , the same javascript worked fine in a browser) , but I thought i'd fixed that issue before release.


RE: Myspace Message Notifier by Spunky on 09-19-2006 at 09:25 PM

Thats my point. The script knows when you've checked the messages... So, if you make a setting true when the toast is first displayed and then false when the script checks and see the messages are no longer there, you can stop the toast displaying while the setting equals true :)


RE: Myspace Message Notifier by IamFroggy on 09-19-2006 at 09:34 PM

But thats what i'm saying the script should ONLY alert if there are new messages , if there are no new messages in your mail box it doesnt alert, and once you have checked your messages it stops alerting

However it does keep alerting until you have checked your messages

It would be easy to tell it to display the toast only once with some sort of variable, but there would be no way for the script to know when to turn it back on  , it doesnt 'know' that you've checked your messages , it doesnt know anything , all it know is what the myspace page tells it, so if it turned the toasts of  after displaying just one for a notification it wouldnt know if a New alert was actually a new alert and to report it or if it was still the old one and not.


RE: Myspace Message Notifier by cloudhunter on 09-20-2006 at 12:01 AM

A compromise: How about it detects when the toast is pressed, and if it is, stops showing the toasts :)

Cloudy


RE: Myspace Message Notifier by Spunky on 09-20-2006 at 12:05 AM

quote:
Originally posted by cloudhunter
A compromise: How about it detects when the toast is pressed, and if it is, stops showing the toasts

When would the toast next be displayed? :p

The script reads information from the page. If nothing is new on the page, the script knows theres nothing to display a toast for. so it can reset itself, allowing it to start showing toasts again

EDIT: 200th Post! :p
RE: RE: Myspace Message Notifier by cloudhunter on 09-20-2006 at 12:10 AM

quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by cloudhunter
A compromise: How about it detects when the toast is pressed, and if it is, stops showing the toasts

When would the toast next be displayed? :p


Hmm, didn't think of that one :P
RE: RE: RE: Myspace Message Notifier by IamFroggy on 09-20-2006 at 12:25 AM

quote:
Originally posted by cloudhunter
quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by cloudhunter
A compromise: How about it detects when the toast is pressed, and if it is, stops showing the toasts

When would the toast next be displayed? :p


Hmm, didn't think of that one :P


Hi and thanks for your input :)

I've come up with a solution , of a bogus sort ,what happens is that it displays the toast only once, and doesnt display it while it read that there are still NEW <whatever triggerd the toast> , so for instance if NEW messages triggered it  NEW comments will still trigger it.

Now heres the clever part , it keeps the toasts untriggered while the NEW <whatever> message is recieved (indicating that they havent been seen) , BUT if it gets no NEW <whatever> following   a s NEW <whatever> (indicating its been seen)  it resets itself , so that the next NEW will trigger an event.

HOWEVER for  this means that the  Notifier might miss NEW notifications if a new message is sent within a minute as thats the fequency it polls at, if you read a message and replied and got a reply in less than a minute (very possible)  it would think the new reply and the coresponding NEW <message>was just  the old NEW notifier. This goes for  All the notifiers

THis meand the user might not be notified of events , which was the whole point really. Maybe I could implement this as an option with a warning of low accuracy of  reporting things happening within a minute , or frequency of each other?
RE: RE: Myspace Message Notifier by IamFroggy on 09-20-2006 at 11:52 AM

quote:
Had an alert saying I had a "Birthday Reminder", but it filled the whole toast with text... (repeating the same words over and over) Also, there should be an option to turn of the alert once it's been shown once.

Had a friends request that replicated that error today so I fixed the bug and attached a the new version to the first post
RE: Myspace Message Notifier by jmccarroll on 09-20-2006 at 02:19 PM

Would it be possible to toggle what it checks for? Like say if you wanted it to check for messages and comments, but not bulletins, birthdays, etc.

Also, can you make it to where you can enter your own sound without going in and editing the script itself ... and being able to toggle notify by sound on/off, as well.


RE: Myspace Message Notifier by Spunky on 09-20-2006 at 02:24 PM

Thats a good idea. not interested in people's birthdays... They never get ME nything ;)


RE: RE: Myspace Message Notifier by IamFroggy on 09-20-2006 at 03:18 PM

quote:
Originally posted by jmccarroll
Would it be possible to toggle what it checks for? Like say if you wanted it to check for messages and comments, but not bulletins, birthdays, etc.

Also, can you make it to where you can enter your own sound without going in and editing the script itself ... and being able to toggle notify by sound on/off, as well.


yes indeedy i always intended to make the sound playing configurable with yes/no , i can make it so you chose the sound I suppose.

Also it would be easy to define what you wanted to be notified off i'll start making a new options screen
RE: Myspace Message Notifier by jmccarroll on 09-21-2006 at 06:18 PM

Another thing... When you attach a new version will you change the filename.  And put the version number in the About window, and change the version number in the script itself.

Supposedly 0.3 is attached, but I'm downloading a copy that has 0.2 listed in the script.  Nothing anywhere to tell me what version number I have.  So I uninstalled and cleared my cache, thinking I was downloading an old one, and the same thing happened.  Did you forget to change it in the script or did you attach the wrong file?

Easiest way would be to put a version number in the file name ... but please put it in the About window too.

Thanks.


RE: RE: Myspace Message Notifier by IamFroggy on 09-22-2006 at 12:24 PM

quote:
Originally posted by jmccarroll
Another thing... When you attach a new version will you change the filename.  And put the version number in the About window, and change the version number in the script itself.

Supposedly 0.3 is attached, but I'm downloading a copy that has 0.2 listed in the script.  Nothing anywhere to tell me what version number I have.  So I uninstalled and cleared my cache, thinking I was downloading an old one, and the same thing happened.  Did you forget to change it in the script or did you attach the wrong file?

Easiest way would be to put a version number in the file name ... but please put it in the About window too.

Thanks.


Yea sorry about that I just sorta put it together and put it up , ok i'm gonna add somethings to it today

RE: Myspace Message Notifier by IamFroggy on 09-22-2006 at 06:58 PM

*uploaded* to version 4  see first post for changes


RE: Myspace Message Notifier by Spunky on 09-22-2006 at 08:05 PM

code:
        SoundFileA = XMLDoc.getElementsByTagName("SoundFile");
        MSUser=MSUserA[0].text;
        MSPass=MSPassA[0].text;
        SoundFile=SoundFileA[0].text;

Line 193 returns an error in the latest version. I'm guessing it's because SoundFileA[0].text doesn't exist... This maybe because I didn't remove the previous version, but you may want to add a statement that checks for older version and removes the settings, or imports them into the new script :^)

Spelling mistake on line 217, I'll let you find it though...
RE: RE: Myspace Message Notifier by IamFroggy on 09-22-2006 at 08:27 PM

quote:
Originally posted by SpunkyLoveMuff
code:
        SoundFileA = XMLDoc.getElementsByTagName("SoundFile");
        MSUser=MSUserA[0].text;
        MSPass=MSPassA[0].text;
        SoundFile=SoundFileA[0].text;

Line 193 returns an error in the latest version. I'm guessing it's because SoundFileA[0].text doesn't exist... This maybe because I didn't remove the previous version, but you may want to add a statement that checks for older version and removes the settings, or imports them into the new script :^)

Spelling mistake on line 217, I'll let you find it though...


Cheers fella but in my defence on line 217 tp instead of to is more of a typo than a spelling mistake.

Yeah I'll be clear to state that the previous versions should be removed if adding options, the next version change will be  to allow users to select what they wanted to be notified about ;)
RE: Myspace Message Notifier by Spunky on 09-22-2006 at 08:28 PM

Sounds like it's really coming along. The script worked once I added the new variables to the settings file manually so it must have been due to the old version :p