Shoutbox

To The Pro's: please correct this cool script - 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: To The Pro's: please correct this cool script (/showthread.php?tid=63428)

To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 09:35 AM

--------------------------------------------------------------------------------------------
function OnEvent_MyStatusChange( [4] NewStatus );

{
This is a read/write property.
[boolean] Blocked(
    [xxxx@xxxx.nl] Email
);


    [boolean] DisplayToast(
        ["Sander"] Title,
        ["Sander heeft je geblokkeerd."] Message,
        [C:\Program Files\MSN Messenger\online.wma] SoundFile,

}
-------------------------------------------------------------------------------------------
(made red, CUZ IT DOENST WORK)

now this is a code i made, it doesnt work. i hope someone can change it for me.
a simple explanation: a script, wich makes a toast popup, with the message ''sander has blokked you'', sander as title, and online.wma as a soundfile. i want to enter a email adres in the script, to specifie the user where you want the block information from, if he blokked you or not. i want this toast to appear when you change your status to Busy.
so, please correct this if you can. when corrected, post on this topic and feel free to use it everyone!

PS: please keep the idea to enter a email adres (and a message and title for that adres)  in the script by yourself, by the editing button in the plus menu. also if this script is corrected, is it possible to copy and past this script a few times, each script part a different email adres and message, but still in the same script js file?
Thanks already.


RE: To The Pro's: please correct this cool script by ShawnZ on 07-17-2006 at 09:39 AM

All that needs to be said is that you need to actually learn the language before you write code for it.


RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 09:43 AM

thats a fast reply... but youre right. i do know the language, but not that much. but please help me, im only a simple beginner scripter, and i want the code finished...


RE: To The Pro's: please correct this cool script by NiteMare on 07-17-2006 at 09:44 AM

you've left in too much of the eplination stuff in there, try this:

code:
function OnEvent_MyStatusChange(NewStatus){
     If (NewStatus == "4"){
           Messenger.Blocked("xxxx@xxxx.nl");
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
     }
}


Secondly, the DIsplay Toast does not support wma files
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 09:45 AM

THANK YOU SO MUCH ill try it:P
it doesnt really matter that the wma doesnt work. al that cares is the script:P

PS: when someone is online:(


RE: RE: To The Pro's: please correct this cool script by segosa on 07-17-2006 at 09:50 AM

quote:
Originally posted by NiteMare
you've left in too much of the eplination stuff in there, try this:
code:
function OnEvent_MyStatusChange(NewStatus){
     If (NewStatus == "4"){
           Messenger.Blocked("xxxx@xxxx.nl");
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
     }
}


Secondly, the DIsplay Toast does not support wma files


"Messenger.Blocked("xxxx@xxxx.nl");"

What's that supposed to do? It's never gonna work...
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 09:52 AM

in the xxxx you fill in the adres:P like mike@hotmail.com. this is just an example.

oh and the .nl is for the dutch people:P


RE: RE: To The Pro's: please correct this cool script by segosa on 07-17-2006 at 09:55 AM

quote:
Originally posted by DennisMartijn
in the xxxx you fill in the adres:P like mike@hotmail.com. this is just an example.

oh and the .nl is for the dutch people:P


Look, I know that, but that code will not work, with or without a valid e-mail address.

If you're trying to make a block checker, it's not possible. Otherwise, I really don't understand what you want this script to do.
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 09:57 AM

oh? can you tell me why it doesnt work then? is it because the script still think the person is offline?
and is there a fix for that?


RE: To The Pro's: please correct this cool script by NiteMare on 07-17-2006 at 10:02 AM

Try Contact.Blocked instead of Messenger.Blocked

i never looked it up, just took a guess, i was really going to lay out and format, give show him how its done

its probualy won't work, i'm still too grogy to code


RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 10:03 AM

ill try...


RE: To The Pro's: please correct this cool script by Eljay on 07-17-2006 at 10:04 AM

a few points..

  • DisplayToast() displays a toast for you, it isnt possible to display a toast to your contact
  • Contact.Blocked tells you if you blocked that person, not if they blocked you
  • Sound file names need to be escaped properly (e.g. "C:\\blah.txt" instead of "C:\blah.txt")

edit: Nitemare, giving him wrong code seriously wont help..
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 10:06 AM

well, i dont want the contact to display a toast to him,
thanks for the second point correction,
and im just stupid:P


RE: To The Pro's: please correct this cool script by NiteMare on 07-17-2006 at 10:07 AM

quote:
Originally posted by Eljay
a few points..

  • DisplayToast() displays a toast for you, it isnt possible to display a toast to your contact
  • Contact.Blocked tells you if you blocked that person, not if they blocked you
  • Sound file names need to be escaped properly (e.g. "C:\\blah.txt" instead of "C:\blah.txt")

edit: Nitemare, giving him wrong code seriously wont help..

better then what he had, it showed him  that format atleast!

try this instead
code:
     Person = Contacts.GetContact("XXXX@XXXX.nl");
     Person.Blocked = True;


i'll stop posting now, since apparently i'm not helping


RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 10:08 AM

you are helping!!!!!
please dont stop!

i mean it, you gave me almost the whole big correction:P


RE: To The Pro's: please correct this cool script by Eljay on 07-17-2006 at 10:10 AM

please could you explain exactly what you want the script to do, what i understood was:

you want to specify a persons email, and when you change your status to busy you want a toast showing whether the person specified has blocked you or not... right?


RE: To The Pro's: please correct this cool script by Matti on 07-17-2006 at 10:15 AM

Full explanation of the code:

code:
function OnEvent_MyStatusChange(NewStatus){
This rule declares an event function called when you changes your status.
code:
     If (NewStatus == "4"){
And if your new status is set on Busy...
code:
           Messenger.Blocked("xxxx@xxxx.nl");
...an unexisting function Blocked() in the Messenger object will be called. This should have to be
code:
          var sander = Contacts.GetContact("xxxx@xxxx.nl");
          var sanderIsBlocked = sander.Blocked;
to see if you blocked him or
code:
          var sander = Contacts.GetContact("xxxx@xxxx.nl");
          sander.Blocked == true;
to block him. So, no block checker at all!
code:
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
Then, a toast will popup that Sander has blocked you... :-/

Block checkers don't work, and there's no way you can create them due to the Messenger Protocol!

RE: To The Pro's: please correct this cool script by Felu on 07-17-2006 at 10:17 AM

Here's the code :cheesy:

code:
function OnEvent_MyStatusChange(NewStatus)
{
if (NewStatus == "4")
{
  var Contacts = Messenger.MyContacts;
  var Contact = Contacts.GetContact("smarterchild@hotmail.com");
  if (Contact.Blocked == false)
  {
    Contact.Blocked = true;
  }
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
     }
}


RE: To The Pro's: please correct this cool script by NiteMare on 07-17-2006 at 10:20 AM

quote:
Originally posted by -!Felu!-
Here's the code :cheesy:
code:
function OnEvent_MyStatusChange(NewStatus)
{
if (NewStatus == "4")
{
  var Contacts = Messenger.MyContacts;
  var Contact = Contacts.GetContact("smarterchild@hotmail.com");
  if (Contact.Blocked == false)
  {
    Contact.Blocked = true;
  }
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
     }
}



i would have gotten there soon enough:P

RE: To The Pro's: please correct this cool script by John Anderton on 07-17-2006 at 10:23 AM

Toasts dont take wma's do they 8-)
---

quote:
Originally posted by #msgplus.script
(17-Jul-06) (15:56:34) <JAnderton>   var Contacts = Messenger.MyContacts;
(17-Jul-06) (15:56:34) <JAnderton>   var Contact = Contacts.GetContact("smarterchild@hotmail.com");
(17-Jul-06) (15:56:45) <JAnderton> am i the only one who sees a typo there
(17-Jul-06) (15:56:51) <JAnderton> and i see what his script is for
(17-Jul-06) (15:57:05) <JAnderton> he wants to block anyone who messages him while he is busy ¬¬
(17-Jul-06) (15:57:13) <JAnderton> just freaking sign out!!!

RE: To The Pro's: please correct this cool script by andrey on 07-17-2006 at 10:32 AM

quote:
Originally posted by -!Felu!-
code:
function OnEvent_MyStatusChange(NewStatus)
{
if (NewStatus == "4")
{
  var Contacts = Messenger.MyContacts;
  var Contact = Contacts.GetContact("smarterchild@hotmail.com");
  if (Contact.Blocked == false)
  {
    Contact.Blocked = true;
  }
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
     }
}

Again, this shows a pop-up if you blocked this contact, not if he has blocked you.

Btw, "Sander heeft je geblokkeerd." means afaik "Sander has blocked you."

What DennisMartijn wants is
quote:
Originally posted by DennisMartijn
a script, wich makes a toast popup, with the message ''sander has blokked you'
which will never work, because you can't see if someone has blocked you. Block checkers DO NOT work

RE: To The Pro's: please correct this cool script by Eljay on 07-17-2006 at 10:32 AM

quote:
Originally posted by -!Felu!-
Here's the code :cheesy:
code:
function OnEvent_MyStatusChange(NewStatus)
{
if (NewStatus == "4")
{
  var Contacts = Messenger.MyContacts;
  var Contact = Contacts.GetContact("smarterchild@hotmail.com");
  if (Contact.Blocked == false)
  {
    Contact.Blocked = true;
  }
           MsgPlus.DisplayToast("Sander", "Sander heeft je geblokkeerd." ," C:\Program Files\MSN Messenger\online.wma");
     }
}


quote:
Originally posted by Eljay
  • Sound file names need to be escaped properly (e.g. "C:\\blah.txt" instead of "C:\blah.txt")


and anyway, as people have already said .wma isnt supported

edit: filenames also need a \ before them if theyre not in the currents script's directory
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 10:35 AM

i dont get it anymore:P is there a working code, or doesnt al codes in wich you want to see if anyone specified blokked you?


RE: To The Pro's: please correct this cool script by Felu on 07-17-2006 at 10:36 AM

quote:
Originally posted by DennisMartijn
alricht. the email you entered, smarterchild@hotmail.com, is that the email of the person who you want to know if he or she blokked you?
Well the code i gave blocks the email and shows a toast.
RE: To The Pro's: please correct this cool script by Ezra on 07-17-2006 at 10:37 AM

quote:
Originally posted by DennisMartijn
alricht. the email you entered, smarterchild@hotmail.com, is that the email of the person who you want to know if he or she blokked you?

You can't see if anyone else has blocked you. That's an invasion of privacy.
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 10:38 AM

that isnt the code i want. check the earlier editted post..


RE: To The Pro's: please correct this cool script by andrey on 07-17-2006 at 10:40 AM

quote:
Originally posted by DennisMartijn
i dont get it anymore:P is there a working code, or doesnt al codes in wich you want to see if anyone specified blokked you?
there is no way to see if someone has blocked you.
RE: To The Pro's: please correct this cool script by Eljay on 07-17-2006 at 10:40 AM

Basically, if what i said was correct and you want this script to check if someone has blocked you, this isnt possible. As i already said Contact.Blocked is if YOU have blocked THEM, not the other way around. Block checkers DO NOT work.


RE: To The Pro's: please correct this cool script by John Anderton on 07-17-2006 at 10:40 AM

quote:
Originally posted by DennisMartijn
alricht. the email you entered, smarterchild@hotmail.com, is that the email of the person who you want to know if he or she blokked you?
thats not possible

What the script posted earlier does is when you change your status to busy, it checks if the contact (with email mentioned in the script) is already blocked. If not then he/she is blocked.
Then you get a toast saying that the person has been blocked.
RE: To The Pro's: please correct this cool script by DennisMartijn on 07-17-2006 at 10:42 AM

alright:P then i know that:P im now working on a prank code, ill tell it later. i think this topic may be locked right now.


RE: RE: To The Pro's: please correct this cool script by foaly on 07-17-2006 at 12:59 PM

quote:
Originally posted by andrey
quote:
Originally posted by DennisMartijn
i dont get it anymore:P is there a working code, or doesnt al codes in wich you want to see if anyone specified blokked you?
there is no way to see if someone has blocked you.

sure there is just log in with their account...
RE: To The Pro's: please correct this cool script by John Anderton on 07-17-2006 at 04:11 PM

quote:
Originally posted by foaly
sure there is just log in with their account...
:dodgy:
Let me rephrase.
Ok there is no legal/practical way to see who has blocked you.