What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Very simple script - very simple problem (I hope)

Pages: (2): « First [ 1 ] 2 » Last »
Very simple script - very simple problem (I hope)
Author: Message:
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. Very simple script - very simple problem (I hope)
Hi, first of all, sorry for my bad english, I'm italian and i'm trying to translate better as possible. Here's my problem: I have to make a very simple script: some phrases personalizables in some points, such as:

Hi there! Today i'm *PERSONALIZED TEXT*

I want to make an XML window with a text box to write personalized text, but I cannot find the function to get the text and send the phrase  with personalization in the chatwindow.

If possibile, i want to make another text box to specify the chatwindow where the text will be written (I.E. e-mail of the receiver)



Surely this is an useless script, but is the base to improve other scripts :(

This post was edited on 02-26-2009 at 11:04 AM by Oceanor.
02-25-2009 01:41 PM
Profile E-Mail PM Find Quote Report
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. RE: Very simple script - very simple problem (I hope)
up: i've reviewed some scripts to understand how xml works, but i have just a problem: why in the JS file some controls are named BtnCancel, BtnClose, BtnAbout and in the XML file the corrispondent control have IDs named BtnCancel, BtnClose, BtnDisable? How can i create a new control if names are different? :@

This post was edited on 02-26-2009 at 11:04 AM by Oceanor.
02-26-2009 11:04 AM
Profile E-Mail PM Find Quote Report
djdannyp
Elite Member
*****

Avatar
Danny <3 Sarah

Posts: 3546
Reputation: 31
37 / Male / Flag
Joined: Mar 2006
RE: Very simple script - very simple problem (I hope)
You can call the control whatever you want

You could call it BtnDestroyTheWorld and as long as when attributing the function you used that name, then it will do whatever you tell it
[Image: 1ftt0hpk-signature.png]
AutoStatus Script || Facebook Status Script
5235 days, 5 hours, 53 minutes, 54 seconds ago
02-26-2009 11:25 AM
Profile E-Mail PM Find Quote Report
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. RE: Very simple script - very simple problem (I hope)
Thanks for the answer ;)

My problem if different: I'm watching a script (message gradiator) and in the XML file there are 3 buttons:

<Control xsi:type="ButtonControl" Id="BtnDisable"><Position Top="220" Left="45" Width="60"/><Caption>Disabilita</Caption></Control>

<Control xsi:type="ButtonControl" Id="BtnClose"><Position Top="220" Left="115" Width="60"/><Caption>Salva e Esci</Caption></Control>

<Control xsi:type="ButtonControl" Id="BtnCancel"><Position Top="220" Left="185" Width="60"/><Caption>Annulla</Caption></Control>

Ids are "BtnDisable",BtnClose",BtnCancel", and they are 3 buttons to save, cancel and exit from the xml window.

If i want to rename these IDs or create another button to quit from the window, where I have to change something? If I change IDs, buttons become useless.. so, in other words, where the ids are linked?

Ps. no traces of these IDs with a search in the JS part.

This post was edited on 02-26-2009 at 12:10 PM by Oceanor.
02-26-2009 12:08 PM
Profile E-Mail PM Find Quote Report
djdannyp
Elite Member
*****

Avatar
Danny <3 Sarah

Posts: 3546
Reputation: 31
37 / Male / Flag
Joined: Mar 2006
RE: RE: Very simple script - very simple problem (I hope)
quote:
Originally posted by Oceanor
Ps. no traces of these IDs with a search in the JS part.


js code:


Look more carefully ;)
[Image: 1ftt0hpk-signature.png]
AutoStatus Script || Facebook Status Script
5235 days, 5 hours, 53 minutes, 54 seconds ago
02-26-2009 12:17 PM
Profile E-Mail PM Find Quote Report
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. RE: Very simple script - very simple problem (I hope)
oh god thank you! I'll try to make a script from 0 in some hour.. :D:D
02-26-2009 01:20 PM
Profile E-Mail PM Find Quote Report
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. RE: Very simple script - very simple problem (I hope)
code:
<Controls>
    <Control xsi:type="StaticControl" Id="Title">
        <Position Top="8" Width="350" Left="110" Height="40"/>
        <Font><Size>12</Size></Font>
        <Caption>Mio Profilo</Caption>
    </Control>
   
    <!-- Frase n1 -->
    <Control xsi:type="StaticControl" Id="Nome">
        <Position Top="25" Width="100" Left="5" Height="10"/>
        <Caption>Nome: </Caption>
        <Font><Bold>true</Bold></Font>
    </Control>

    <Control xsi:type="EditControl" Id="NuovoNome">
        <Position Top="25" Width="170" Left="70"/>
        <Caption></Caption>
        <Font><Bold>True</Bold></Font>
    </Control>

    <Control xsi:type="ButtonControl" Id="BtnConfermaNome">
        <Position Top="25" Left="250" Width="40"/>
        <Caption>Conferma</Caption>
    </Control>
   
    <!-- Frase n2 -->
    <Control xsi:type="StaticControl" Id="Frase">
        <Position Top="40" Width="100" Left="5" Height="10"/>
        <Caption>Cognome: </Caption>
        <Font><Bold>true</Bold></Font>
    </Control>

    <Control xsi:type="EditControl" Id="NuovaFrase">
        <Position Top="40" Width="170" Left="70"/>
        <Caption></Caption>
        <Font><Bold>True</Bold></Font>
    </Control>

    <Control xsi:type="ButtonControl" Id="BtnConfermaFrase">
        <Position Top="40" Left="250" Width="40"/>
        <Caption>Conferma</Caption>
    </Control>

   
   
   
   
    <Control xsi:type="ButtonControl" Id="BtnAbout">
        <Position Top="220" Left="45" Width="60"/>
        <Caption>Informazioni</Caption>
    </Control>

    <Control xsi:type="ButtonControl" Id="BtnCancel">
        <Position Top="220" Left="185" Width="60"/>
        <Caption>Chiudi finestra</Caption>
    </Control>

</Controls>


This is my XML part (just 2 lines + 2 buttons, close window and information. Here's the JS part:

code:
function OnOptionsEvent_CtrlClicked(Wnd, ControlId)
{
    if(ControlId == "BtnAbout")
    {
        var Wnd = MsgPlus.CreateWnd("gui.xml", "About");
    }
   
    if(ControlId == "BtnConfermaNome")
    {
        Wnd.Close(1);
    }
   
    if(ControlId == "BtnCancel")
    {
        Wnd.Close(1);
    }
}


When I click the BtnCancel button, the window is closed, but when i click BtnConfermaNome, nothing happens.

Obviusly, for now most buttons are useless, but i'm interested in understanding why nothing happen with some names and works with BtnCancel..

:(:(:(:(:(:(:(:(

This post was edited on 02-26-2009 at 05:41 PM by Oceanor.
02-26-2009 05:40 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Very simple script - very simple problem (I hope)
BtnCancel is automatically supported by Plus! to close the window without the need of any code. Therefore your function may not actually be called. Turn on Event traceing in the debug window first off.

Secondly post all of the code from the XML and the JS file so we can take a look at all of it. Just giving us what you did doesn't show any issues. (Reason I am asking is your Window may not actually be called Options. function OnWindowIdEvent_CtrlClicked() therefore you replace WindowId with the name of yoru window.)

This post was edited on 02-26-2009 at 06:44 PM by matty.
02-26-2009 06:36 PM
Profile E-Mail PM Find Quote Report
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. RE: Very simple script - very simple problem (I hope)
Many many thanks.. finally i found the solution to my problem :)

I forgot to rename
function OnOptionsEvent_CtrlClicked(Wnd, ControlId)
in
function OnFinestracomandiEvent_CtrlClicked(Wnd, ControlId)

because I didn't know this modify to the function before..

So, thanks djdannyp and matty, if i can do something for you, just afk me :)

This post was edited on 02-27-2009 at 02:34 AM by Oceanor.
02-27-2009 12:02 AM
Profile E-Mail PM Find Quote Report
Oceanor
New Member
*


Posts: 10
– / Male / Flag
Joined: Feb 2009
O.P. RE: Very simple script - very simple problem (I hope)
Err, sorry again, another question ^^'

How can i edit a XML window having a preview of it? For now every change that i make i have to rar the xml file into the archive, rename it to plsc, import the script, start the script from messenger and view the window.. :(
02-27-2009 10:04 AM
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