What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Tutorial, but better isnt a bad idea is it?

Pages: (2): « First [ 1 ] 2 » Last »
Tutorial, but better isnt a bad idea is it?
Author: Message:
DennisMartijn
Full Member
***


Posts: 119
Joined: Jul 2006
O.P. Undecided  Tutorial, but better isnt a bad idea is it?
Since im a dutch guy, i dont understand the script documentation, or tutorials made by others (yeah i saw the new thread).

Is someone willing to make a tutorial, with good explenations, and especialy EXAMPLES?
code:
OnEvent_ContactSignin(
    [string] Email
);

i dont get it.
do you have to fill an email adres in the code like this:
code:
OnEvent_ContactSignin(
    justastupidname@hotmail.com Email
);

or whatever?

this is an example of something i dont understand. please, is anyone willing to make a tutorial of simple and fun scripts?

hope this isnt to much to ask... but well, im a dumpass in JScript.

oh by the way, if you show the example, please show the original found in the documentation either. like this:
code:
OnEvent_ContactSignin(
    [string] Email
);


//this is the example (the lower one), no i dont know if this is right but i want to show you how i mean things... anyway
OnEvent_ContactSignin(
    irealyneedhelprightnow@JScript.com Email
);


PS: i dont get the whole boaleen (true false etc) thingie either, so if you can show an example wich has true and false in it, and can explain why and how,... i realy appreciate your help. (if i get help:P)

This post was edited on 10-02-2006 at 01:28 PM by DennisMartijn.
10-02-2006 01:22 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Tutorial, but better isnt a bad idea is it?
The things you see in the documentation are called syntaxis. It is a way to descibe how the function must be used. And is actually a common, almost standard, way of writing how something must be used.

eg: If it states:
quote:
OnEvent_ContactSignin(
    [string] Email
);
It means there is a function called OnEvent_ContactSignin which has 1 parameter called Email. The Email parameter must be in the form of a string.

'function', 'parameter', 'string', etc are all words and terms used in programming. Thus this has little todo with the documentations not being clear enough. Such terms should be known by he who wants to program something.

A function is something which is executed, it is a bunch of related code which in the end performs a certain action or manipulates something.

A parameter is something which can change and which is either given to the function as input to work with, or returned by the function as a result of that function.

A string is a type of variable, it is text. Besides a string you can also have integers (numbers), booleans (binary states indicating false or true), etc...

as for an example of:
quote:
OnEvent_ContactSignin(
    [string] Email
);
[code]function OnEvent_ContactSignin(TheEmailParameter) {
    Debug.Trace("The contact with the email " + TheEmailParameter + " has just signed in");
    If (TheEmailParameter == "myfriendsemailaddress@mail.com") {
        // this will be performed if the comparisson is correct, thus TRUE
        Debug.Trace("The person who signed in is my friend")
    } else {
        // this will be performed if the comparisson is not correct, thus FALSE
        Debug.Trace("I don't know the person who signed in ")
    }
}

A boolean is a kind of variable which can only be two things: true or false. Or to put it in another way 1 or 0.

Booleans are used to compare things and to indicate if some comparisson is correct or not.

---------

Seeing your other thread too, I strongly suggest you read up on some basic beginners tutorials about programming (they exist in Dutch too, though every tutorial will use english terms as that is simply the common language for programming terms). You can find excellent books in the local library for instance which explains step by step the general basics about programming like what strings, parameters functions and booleans are.

If you go to your local library search a beginners book about general programming and a book about Jscript programming. You'll find them in the rayon with SISO code 525 to 528.

The reason why I say and suggest this is because it would be way too much to start explaining everything in detail in the proper way on a forum.

This post was edited on 10-02-2006 at 02:11 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-02-2006 01:49 PM
Profile PM Find Quote Report
DennisMartijn
Full Member
***


Posts: 119
Joined: Jul 2006
O.P. RE: Tutorial, but better isnt a bad idea is it?
oke thanks, and how would this code (OnEvent_ContactSignin(
    [string] Email
); 
) be when this email adress is filled in: dennis.kleinman@hccnet.nl?
does there has to be some '' thingies in it? yes i know i can find it in the library, thanks for that but not right now...
10-02-2006 03:18 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Tutorial, but better isnt a bad idea is it?
nothing needs to be filled in. If you read the documentation it states that the parameter Email is a variable which is returned by the function. In other words the parameter Email will give you the email address of he who signed in.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-02-2006 03:35 PM
Profile PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Tutorial, but better isnt a bad idea is it?
Dennis, in all Dutch library's are books about programming. I advice you to find a book about beginning programming in javascript, something like "javascript for dummies" or so. It differs from JScript, but it will at least learn you the basics of programming.

After you understand that, read the messenger plus documentation again and try again! Good luck (Y)
10-02-2006 05:05 PM
Profile E-Mail PM Find Quote Report
saralk
Veteran Member
*****

Avatar

Posts: 2598
Reputation: 38
35 / Male / Flag
Joined: Feb 2003
RE: Tutorial, but better isnt a bad idea is it?
quote:
Originally posted by DennisMartijn
oke thanks, and how would this code (OnEvent_ContactSignin(
    [string] Email
); 
) be when this email adress is filled in: dennis.kleinman@hccnet.nl?
does there has to be some '' thingies in it? yes i know i can find it in the library, thanks for that but not right now...

Just to answer your question...

If you wanted something to trigger when dennis.kleinman@hccnet.nl signs in, then you would use the following code...

code:
OnContact_Signin(Email) {
if (Email = "dennis.kleinman@hccnet.nl") {
//the code that is triggered
}
}

I am going to assume that you know how to do some basic programming in other languages.

When you declare a function you have parameters, for example, in php:

code:
<?
function ExampleFunction($variable) {
echo $variable;
}
?>

then you could call the function as so

code:
ExampleFunction("hello")

and it would echo the world hello.

So OnEvent_ContactSignin is triggered when a contact signs in, and so messenger plus would run your code and do this:

code:
OnEvent_ContactSignin("dennis.kleinman@hccnet.nl")

then your code would be triggered and dennis.kleinman@hccnet.nl would become the variable Email.

I hope that helps.
The Artist Formerly Known As saralk
London · New York · Paris
Est. 1989
10-02-2006 05:35 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Tutorial, but better isnt a bad idea is it?
quote:
Originally posted by saralk
Just to answer your question...

If you wanted something to trigger when dennis.kleinman@hccnet.nl signs in, then you would use the following code...

code:
OnContact_Signin(Email) {
    if (Email = "dennis.kleinman@hccnet.nl") {
        //the code that is triggered
    }
}

that wouldn't work. Corrected:
code:
OnContact_Signin(Email) {
    if (Email == "dennis.kleinman@hccnet.nl") {
        //the code that is triggered
    }
}
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-02-2006 05:41 PM
Profile PM Find Quote Report
DennisMartijn
Full Member
***


Posts: 119
Joined: Jul 2006
O.P. RE: Tutorial, but better isnt a bad idea is it?
ok thanks i now understand a bit better, i just wanted to know how to fill in a code if you want to specifie some-one/thing.

well, time to mess up my scripts, and get started:P:P:P

Btw, if you leeve the code this way:
code:
OnEvent_ContactSignin(
    [string] Email
);
, then the event you want to happen happens when anybody of your contact list is signing in? cuz its a variable?

This post was edited on 10-05-2006 at 03:03 PM by DennisMartijn.
10-05-2006 02:59 PM
Profile E-Mail PM Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Tutorial, but better isnt a bad idea is it?
Correct. But you have to remove "[string]".

Example:
code:
function OnEvent_ContactSignin(Email) {
Debug.trace("The contact " + Email + " has signed in");
}

The above would put the text in the debug window for every contact that signs in when the script is enabled.

This post was edited on 10-05-2006 at 03:10 PM by hmaster.
[Image: sig.png]
10-05-2006 03:08 PM
Profile PM Web Find Quote Report
DennisMartijn
Full Member
***


Posts: 119
Joined: Jul 2006
O.P. RE: Tutorial, but better isnt a bad idea is it?
Thanks;) this really helps me right now.
10-05-2006 03:13 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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