FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Msn Plus! Live Scripting...





Gushe
Hello all Smile
Here is me again Very Happy

Well, Since I have this Msn Plus! Live, I was very exited about the scripts system. Smile I was also very obsessed with scripting, So I decided to try learning the Msn Plus! Live scripting Smile

It's basicly JavaScript, But offcourse with special Msn Events, Objects and Interface etc Smile

Now; I was wondering if there are any Msn Plus! Live Scripters out here? Smile Because I seriously need some help on my First *Real* Script! Razz Very Happy


I am trying to make an *Msn Locker:
A script that when somebody logs in on my pc with another email adress than mine, He will have to enter the password that the msn is locked with, otherwise he will log out immediatly Smile
(Yes I Know, just by deleting it from my scripts file in the Msn Plus! Live file you can just log in, but my brothers don't know Razz Wink )

There is also a menu added; when you click on the Msn Locker menu you will see 2 choices: About and Set Password.
If you click the "Set Password", A window pops up where you can enter the password you want your msn to be locked with Smile

Atm it's only ment for my pc, but when that works I will make so that you can enter your admin email adress, the email adress that doesnt need password provided Smile

If you click the "About", A messagebox pops up to tell you I made the script Smile



Well; for all of this I wrote "A" Script, But I'm really unsure if it really works Razz And I have this irritating error in my debugger which says that I have an unexpected "}" on line 92 :S (Only problem left! Very Happy)


So, I would just want to ask is there is anyone who could possibly help me? Smile
I'll post the 3 files I wrote underneeth (The Script, ScriptInfo.xml and ConfWnd.xml)



The Script
Code:

var password;

function OnEvent_Signin(Email)
{
   if (Email == "gust_verbruggen@hotmail.com")
   {
   var Message = "Welcome Gust, Email Approved";
   Message = MsgPlus.RemoveFormatCodes(Message);
   MsgPlus.DisplayToast("", Message);
   }
   
   else
   {
   
   var x = MsgPlus.CreateWnd("ConfWnd.xml","WndConf");
      
function OnConfWndEvent_CtrlClicked(PlusWnd,ControlId)
{
   switch(ControlId)
   {
      case "ok":
      {
         if (password != "")
         {
             if (x.GetControlText("ConfPass") == password)
            {
            var Msgconf = "Welcome Guest, You're Welcome to Use This Msn";
            Msgconf = MsgPlus.RemoveFormatCodes(MsgConf);
            MsgPlus.DisplayToast("", Msgconf);
            PlusWnd.Close(1);
            }
            else
            {
            Messenger.Signout();
            }
         }
         else
         {
         MsgPlus.DisplayToast("", "No password has been set, acces granted!")
         }
      break;
      }
      case "cancel":
      {
      Messenger.Signout();
      break;
      }
    }
      
   }
}
}


function OnEvent_MenuClicked(MenuItemId,Location,OriginWnd)
{
   
   switch(MenuItemId)
   {
   case "SetPass":
      {
      var PassWnd = MsgPlus.CreateWnd("ConfWnd.xml","PassWnd")
         
         function OnConfWndEvent_CtrlClicked(ConfWnd,ControlId)
         {
            switch(ControlId)
            {
            case "enter":
               {   
                  if (PassWnd.GetcontrolText("PassWord") != "")
                  {
                  var password = PassWnd.GetControlText("PassWord");
                  }
            
                  else
                  {
                  MsgPlus.DisplayToast("", "Please Set A Password.");
                  }
                  break;
               }
            }
         }
      break;
      }
      
   case "About":
      {
      Messenger.DisplayToast("","Msn Locker1.0 By Gushe©");
      break;
      }
   
   }
}




ConfWnd.xml
Code:

<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">
 
   <Window Id="Wndconf" Version="1">
      <TitleBar>
         <Title>
            <Text>Confirmation Window!</Text>
         </Title>
      </TitleBar>
      <Position Width="180" Height="75"/>
      <DialogTmpl/>
      <Control xsi:type="StaticControl" Id="ConfPass">
         <Position Top="36" Width="60" Left="9"/>
         <Caption>Enter Password:</Caption>
      </Control>
      <Control xsi:type="ButtonControl" Id="ok">
         <Position Top="70" Width="50" Left="30"/>
         <Caption>Enter</Caption>
      </Control>
      <Control xsi:type="ButtonControl" Id="cancel">
         <Position Top="70" Width="50" Left="100"/>
         <Caption>Cancel</Caption>
      </Control>
   </Window>
   
   <Window Id="SetPass" Version="1">
      <TitleBar>
         <Title>
            <Text>Set Your Password</Text>
         </Title>
      </TitleBar>
      <Position Width="180" Height="75"/>
      <DialogTmpl/>
      <Control xsi:type="StaticControl" Id="PassWord">
         <Position Top="36" Width="60" Left="9"/>
         <Caption>Set Password:</Caption>
      </Control>
      <Control xsi:type="ButtonControl" Id="enter">
         <Position Top="70" Width="50" Left="80"/>
         <Caption>Accept</Caption>
      </Control>
   </Window>
</Interfaces>



Scriptinfo.xml
Code:

<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">

  <Information>
    <Name>Msn Blocker</Name>
    <Description>Logs out unwanted users on your pc.</Description>
    <Author>Gushe</Author>
    <Version>1.0</Version>
  </Information>

   <ScriptMenu>
   <MenuEntry Id="SetPass">Set New Password</MenuEntry>
   <Separator/>
   <MenuEntry Id="About">About..</MenuEntry>
   </ScriptMenu>
   
</ScriptInfo>



So.. That was it Very Happy
I hope there is any help out there Smile Smile



Greetz & Thanx,
~Gushe
Gushe
Anyone..? Smile
Pleasse


~Gushe
Related topics
Trillian
Microsoft is upto it's dirty games again!
[Official] Google IM thread (Google Talk)
Which messenger do you use?
[OFFICIAL] MSN Messenger 8.0 or Windows Live Messenger
msn 8.0!?
What programs do you run
What you prefer- ICQ or Messenger?
[soft]Ya tienen el nuevo Windows Live Menssager???
MSN Live Mail.
Best Messenger
msn messenger stupid question
My WLM take 15 mins to connect ..
MSN Question
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.