What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » send message

send message
Author: Message:
magemello
New Member
*


Posts: 9
Joined: Jan 2008
O.P. send message
hi.....i want send a message in a specific windows how can i do?

i have this windows

function OngiocoEvent_CtrlClicked(gioco, ControlId) {
  switch(ControlId) {
      case "gioca" :
     
      if((turno == squadra) && (cartapescata == 0))
      {
      cartapescata=1;
      CreaDomanda(gioco);
      }
      break; 
  }
}

when this windows is closed i use this function:

function OngiocoEvent_Destroyed(gioco, ExitCode) {
if(ExitCode ==2) {
   scrittura2.SendMessage("windows is closed");
   
   }
}

How i can send a message (windows is closed) in a windows where i have create  windows gioco?

01-30-2008 04:59 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: send message
if you're talking about the "SendMessage" Windows API,
code:
Interop.Call("user32","SendMessageW", hwnd, msg, wparam, lparam);
i don't use SendMessage much so this code might be wrong :tongue:

otherwise, if you're talking about sending a message to a conversation window, you can look it up in the scripting documentation for "ChatWnd::SendMessage"


edit:

after looking at your code, it looks like you want to display a message box.

you can use this :)
code:
Interop.Call("user32","MessageBoxW",0,"title or message","title or message 2",64);

/*
32 = Error
64 = Information
all i can think of atm.
*/


This post was edited on 01-30-2008 at 09:04 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
01-30-2008 09:00 PM
Profile PM Web Find Quote Report
magemello
New Member
*


Posts: 9
Joined: Jan 2008
O.P. RE: send message
No good ... i write another example


code:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)


   if(sMessage=="take")
   {
   idpartita=ChatWnd.Handle;
   return "";
   }
   
   if(sMessage=="send")
   {
    ChatWnd.SendMessage("hello");

   return "";
   }
}

i write in a first windows "take" ,and in another windows i write "send",but i want when  write "send"  ,"hello" message  is write in first windows where i take handle

This post was edited on 01-31-2008 at 11:59 AM by magemello.
01-31-2008 11:54 AM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: send message
ah, this should work
the code wasn't using a global variable.

code:
var idpartita;
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage){
if(sMessage == "take"){
idpartita = ChatWnd;
return "";
}
if(sMessage == "send"){
idpartita.SendMessage("hello");
return "";
}
}
[quote]
Ultimatess6
: What a noob mod
01-31-2008 01:15 PM
Profile PM Web Find Quote Report
magemello
New Member
*


Posts: 9
Joined: Jan 2008
O.P. RE: send message
very nice!!! I admire you :) thanks
01-31-2008 02:53 PM
Profile E-Mail PM Find Quote Report
« 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