Shoutbox

help with my 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: help with my script (/showthread.php?tid=71328)

help with my script by lammerzor on 02-03-2007 at 12:27 AM

hello

i was writing my script and when i go to the menu and click on my script nothing appends :S and it was to open the windows.xml

here is the code

script:

code:
var test = '';

function OnEvent_Signin(Email)
{
if(Email == "zeroonnet@internetskill.net")
{
var Message = "Hello Master " + Messenger.MyName + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("", Message);
}
}

function OnGetScriptMenu(){
var ScriptMenu = "<ScriptMenu>";
ScriptMenu += "<MenuEntry Id='zerotools'>";
ScriptMenu += "zeroonnet tools";
ScriptMenu += "</MenuEntry>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;
}

function OnEvent_MenuClicked(sMenuId){
if(sMenuId == "zerotools") {test = MsgPlus.CreateWnd("windows.xml","zerotools");}
}

function OnzerotoolsEvent_CtrlClicked(PlusWnd, ControlId){
if(ControlId == "fechar") {PlusWnd.Close(1);}
}

windows.xml

code:
<Interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Window Id="zerotools" Version="0.5">
    <Attributes>
        <Caption>zerotools</Caption>
        <SetForeground>True</SetForeground>
        <TopMost>true</TopMost>
    </Attributes>
    <Position Width="150" Height="100"/>
        <WindowTmpl>
            <Corners Shape="Round">
                <RoundSize>3</RoundSize>
            </Corners>
            <Borders Type="Dialog"/>
        </WindowTmpl>
        <Controls>
        <Control xsi:type="ButtonControl" Id="fechar">
        <Position Left="50" Top="50" Width="20" Height="10"/>
        <Caption>Fechar</Caption>
        </Control>
        </Controls>
    </Window>
</Interfaces>

wher is the error?


sorry my bad bad english but i am portuguese :D and sorry if the error is stupid but this is my first script :D
RE: help with my script by roflmao456 on 02-03-2007 at 01:25 AM

make sure windows.xml is saved as UTF-16/Unicode (16)


RE: help with my script by lammerzor on 02-03-2007 at 01:54 AM

i use this program to save (Stylus Studio 2007 XML Enterprise Suite) and i use that 2 programs that are in you signature...

what program shold i use to save in UTF-16/Unicode?

:D it's working now :D thanks for help :D


RE: help with my script by CookieRevised on 02-04-2007 at 01:26 AM

quote:
Originally posted by lammerzor
what program shold i use to save in UTF-16/Unicode?
Any program which supports unicode, eg: Notepad.

----------------------

Also:
quote:
Originally posted by lammerzor
<Window Id="zerotools" Version="0.5">

'Version' is NOT your script version! It must be the version number of the scripting interface. Which is either 1 or 2, depending on what stuff you used in the interface.

Consult the official scripting documentation before (and also during!) scripting.


----------------------

PS: try not to double post. If you have anything to add to a thread and nobody replied to it yet (you have the last post) then [Image: edit.gif] your post instead.