Msn Plus! Live scripting..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gushe
    New Member
    • Dec 2007
    • 4

    Msn Plus! Live scripting..

    Hello all.

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

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

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


    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 :)
    (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)

    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

    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

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


    But;
    When logging in with a wrong e-mail adress, clicking the menu to set a password or clicking the "about" button, nothing happens.. :(
    Th only thing that works is a confirmation message when I log on with my email adress..

    So, I would just want to ask is there is anyone who could possibly help me? :)
    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 == "g*****************n@hotmail.com")
    	{
    	var Message = "Welcome Gust, Email Approved";
    	Message = MsgPlus.RemoveFormatCodes(Message);
    	MsgPlus.DisplayToast("", Message);
    	}
    	
    	else
    	{
    	
    	var x = MsgPlus.CreateWnd("ConfWnd.xml","WndConf");
    
    // this is inside the other function.		
    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;
    		}
    	
    	}
    }


    [size=16]ConfWnd.xml[/size]
    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>

    [size=16]Scriptinfo.xml[/size]
    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! :)
    I hope there is any help out there!



    Greetz & Thanx,
    ~Gushe
    Last edited by gits; Dec 10 '07, 09:41 PM. Reason: edit out email address
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Is that the whole script? If it is, you haven't closed OnEvent_Signin properly.

    This isn't really JavaScript, so I don't know how much help you'll get with this.

    Comment

    • Gushe
      New Member
      • Dec 2007
      • 4

      #3
      Yup that's pretty much the whole script ;)

      Strange; Because the script debugger didn't give any errors..


      And I asked where to place this.. and they said perhaps Javascript.. Where would I have to place this to get more help..? I searched like the whole internet..


      Greetz,
      ~Gushe

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        I see that the function is within the else block.

        Is there no API for this?

        Comment

        • Gushe
          New Member
          • Dec 2007
          • 4

          #5
          I Don't really understand what "API" is..

          I just made it in the Standard Msn Plus! Live Scripting program.. It's included with the Msn Plus! Live.. And they have made sort off their own scripting language for it..

          Greetz,
          Gushe

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by Gushe
            I Don't really understand what "API" is..
            An Application Programming Interface - API.

            Comment

            Working...