Shoutbox

How can I ?? please enter - 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: How can I ?? please enter (/showthread.php?tid=93439)

How can I ?? please enter by sayed on 01-05-2010 at 05:03 PM

hello world ..

i'm new here :)

i've been making script for plus and i have one problem
and it is about sending message to the selected chat
by pressing button on the MainWnd for the script

please help ,,

bye


RE: How can I ?? please enter by robert_dll on 01-05-2010 at 05:26 PM

One suggestion, use a better subject than "How can I ?? please enter" and please explain us better what you want to do.


RE: How can I ?? please enter by sayed on 01-05-2010 at 05:33 PM

Ok .. I want send message by clicking button in the script preferences and the message sent to the contact that I talk with he.. the chat window that I pressed script preferences from ,

Thanks


RE: How can I ?? please enter by robert_dll on 01-05-2010 at 05:35 PM

sorry but still don't get it


RE: How can I ?? please enter by sayed on 01-05-2010 at 05:37 PM

Lool .. Like changing nickname from script button press .. I want sending message by clicking the button


RE: How can I ?? please enter by robert_dll on 01-05-2010 at 05:41 PM

but... what's the point on doing that? you can just open a chat windows and send any message...maybe I still don't get what you want to do, but your sentences hardly make sense.


RE: How can I ?? please enter by sayed on 01-05-2010 at 05:54 PM

I'm not english .. but i mean sending message by javascript by this code "SendMessage()".. i don't know how to do that by plus script


RE: How can I ?? please enter by matty on 01-05-2010 at 06:24 PM

What I think the OP is looking for is a way to click a button in a custom window and have it send a message to a Chat Window.

Couple questions you need to clarify though;
Is the Window opened by a command in the Chat Window?
How do you want to handle the case where there are multiple chat windows open?


RE: How can I ?? please enter by sayed on 01-05-2010 at 06:35 PM

yes .. you there mate ,

Is the Window opened by a command in the Chat Window?
not a command .. from the script menu under the chat window ..

How do you want to handle the case where there are multiple chat windows open?
no not all chats only the selected chat


RE: How can I ?? please enter by robert_dll on 01-05-2010 at 07:03 PM

What about using Quick texts?


RE: How can I ?? please enter by sayed on 01-05-2010 at 07:05 PM

How ? And what the meaning


RE: How can I ?? please enter by robert_dll on 01-05-2010 at 07:10 PM

In English, Plus!-Preferences & Options-Conversations-Quick texts
You can set "quick texts" and define a command for them to be sent.


RE: How can I ?? please enter by sayed on 01-05-2010 at 07:18 PM

No . I've been making script for msgplus and matty explain what I mean .. look at his post and reply


RE: How can I ?? please enter by matty on 01-05-2010 at 07:21 PM

Javascript code:
var oChatWnd;
 
function OnEvent_MenuClicked(sMenuId, nLocation, pOirgin) {
    if (sMenuId === 'MyMenu') {
        if (nLocation === MENULOC_CHATWND) {
            oChatWnd = pOrigin; // this gives you access to the chat window so you can use SendMessage
        }
    }
}


RE: How can I ?? please enter by sayed on 01-05-2010 at 07:28 PM

thanx but can you give the full code with SendMessage function ?

this is my code

code:
function OnWndMainEvent_CtrlClicked(Wnd, ControlId) {
    if(ControlId == "ButtonSend") {
        vari[0] = Wnd.GetControlText("var1");
        vari[1] = Wnd.GetControlText("var2");
        Wnd.Visible = false;
        Wnd.SendMessage("hi");
    }
}

is this correct ?
RE: How can I ?? please enter by matty on 01-05-2010 at 08:47 PM

quote:
Originally posted by sayed
this is my code

code:
function OnWndMainEvent_CtrlClicked(Wnd, ControlId) {
    if(ControlId == "ButtonSend") {
        vari[0] = Wnd.GetControlText("var1");
        vari[1] = Wnd.GetControlText("var2");
        Wnd.Visible = false;
        Wnd.SendMessage("hi");
    }
}

is this correct ?
No,

The variable Wnd defines the Plus! window not the conversation window.
RE: How can I ?? please enter by sayed on 01-06-2010 at 10:33 AM

whats the variable of chat window ?


RE: How can I ?? please enter by sayed on 01-06-2010 at 11:51 AM

please, anyone help me ?


RE: How can I ?? please enter by matty on 01-06-2010 at 01:56 PM

quote:
Originally posted by sayed
whats the variable of chat window ?
There isn't one. You need to assign it using the code I showed you from the OnEvent_MenuClicked function...