What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » My own msg with SendMessage

My own msg with SendMessage
Author: Message:
SuNcO
Full Member
***

Avatar

Posts: 128
Reputation: 6
40 / Male / Flag
Joined: Jan 2005
O.P. My own msg with SendMessage
I'm new developing Scripts for Plus!

I want to made my first one, is about encrypt msgs (yes, there are 3 yet) but limited

Well, my problem is this :

I got my own msg on the ChatWndSendMessage event. I modify it and made a return so it appear on my convo. Ok, i made a return and made a SendMesaage to send it to the other person but i see that modified msg. With some modifications i see both msgs

The point is.. can i only see my normall msg and send the encoded one ?

Im thinking and maybe that (see every msg) is a security issue


.jpg File Attachment: plus2.jpg (10.1 KB)
This file has been downloaded 149 time(s).
12-05-2007 05:31 AM
Profile PM Find Quote Report
NiteMare
Veteran Member
*****

Avatar
Giga-Byte me

Posts: 2499
Reputation: 37
32 / Male / Flag
Joined: Aug 2003
RE: My own msg with SendMessage
can you post your script here so we can see whats wrong?
[Image: sig/]
I'll never forget what she said 4967 days, 1 hour, 58 minutes, 15 seconds ago
Need hosting? Check
out my website. we can help you out :)
12-05-2007 06:18 AM
Profile PM Web Find Quote Report
SuNcO
Full Member
***

Avatar

Posts: 128
Reputation: 6
40 / Male / Flag
Joined: Jan 2005
O.P. RE: My own msg with SendMessage
code:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage) {
  // check if it is an encoded msg
  if (Mid(sMessage,0,1) != "") {
    // check if this contact have a pass setted
    for (i = 0; i < hwnds.length; i ++) {
      if (hwnds[i] == ChatWnd.Handle) {
        ChatWnd.SendMessage("" + secureEncrypt(claves[i],sMessage));
        //return "";
      }
    }
  } else {
    // is an encoded msg.. so not encode again, just send it
    return sMessage;
  }
}


Off course, need a lot of work, is just a start
12-05-2007 06:24 AM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
30 / Male / Flag
Joined: Jun 2006
RE: RE: My own msg with SendMessage
quote:
Originally posted by SuNcO
code:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage) {
  // check if it is an encoded msg
  if (Mid(sMessage,0,1) != "") {
    // check if this contact have a pass setted
    for (i = 0; i < hwnds.length; i ++) {
      if (hwnds[i] == ChatWnd.Handle) {
        ChatWnd.SendMessage("" + secureEncrypt(claves[i],sMessage));
        //return "";
      }
    }
  } else {
    // is an encoded msg.. so not encode again, just send it
    return sMessage;
  }
}


Off course, need a lot of work, is just a start
i don't know if you really need the loop ;D
i wonder what the Mid function does, try out with  sMessage.substr(0, 1)

code:
ChatWnd.SendMessage("" + secureEncrypt(claves[i],sMessage));
return "";

Please, come to the [Image: favicon.ico] Spanish Forum

:)

This post was edited on 12-05-2007 at 07:15 AM by felipEx.
12-05-2007 07:09 AM
Profile E-Mail PM Find Quote Report
SuNcO
Full Member
***

Avatar

Posts: 128
Reputation: 6
40 / Male / Flag
Joined: Jan 2005
O.P. RE: My own msg with SendMessage
I use the "loop" because i have various passwords.. i mean, one by user, so, i need to find what password use to encrypt the msg

code:
if (hwnds[i] == ChatWnd.Handle) {


If the actual Handle is on the hwnds array.. then encode with their own password

Btw, i think i must use RegisterMessageNotification and OnWindowidEvent_MessageNotification

Im going to read mote about that (yes, i know hook is advanced stuff)
12-05-2007 07:21 AM
Profile PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
37 / Male / Flag
Joined: Aug 2006
RE: My own msg with SendMessage
[align=center]the problem is that you have a send msg inside the chatwndsendmsg event. When you send the text msg it will be encrypted and sent again encrypted..then you have a return after that so it will send also that msg. Instead of using the chatwnd.sendmsg function just do return secureEncrypt(claves(1),msg)...
Hope this helps. Sorry for confusing post but i'm writing from the iphone.
have fun
[Image: signature-user=31&back=4&clr=106,141,166&size=100.png]
12-05-2007 10:15 AM
Profile E-Mail PM Web Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
37 / Male / Flag
Joined: Aug 2006
RE: RE: My own msg with SendMessage
quote:
Originally posted by SuNcO
code:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage) {
  // check if it is an encoded msg
  if (Mid(sMessage,0,1) != "") {
    // check if this contact have a pass setted
    for (i = 0; i < hwnds.length; i ++) {
      if (hwnds[i] == ChatWnd.Handle) {
        ChatWnd.SendMessage("" + secureEncrypt(claves[i],sMessage));
        //return "";
      }
    }
  } else {
    // is an encoded msg.. so not encode again, just send it
    return sMessage;
  }
}


Off course, need a lot of work, is just a start

Hi,

Try this:

code:

function OnEvent_ChatWndSendMessage(ChatWnd, sMessage) {
    // check if this contact have a pass setted
    for (i = 0; i < hwnds.length; i ++) {
      if (hwnds[i] == ChatWnd.Handle) {
        return secureEncrypt(claves[i],sMessage);
      }
    }
}


Have fun!
[Image: signature-user=31&back=4&clr=106,141,166&size=100.png]
12-05-2007 12:38 PM
Profile E-Mail PM Web Find Quote Report
SuNcO
Full Member
***

Avatar

Posts: 128
Reputation: 6
40 / Male / Flag
Joined: Jan 2005
O.P. RE: My own msg with SendMessage
If i try that, i send the  encrypted text and i see the encrypted text

As i say, i don't want to see the encrypted text, just the normal one

Thats why i send the text "twice" (normal and encrypted)
12-05-2007 04:21 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
31 / Male / Flag
Joined: Aug 2006
RE: My own msg with SendMessage
What exactly do you mean? That only sends one message...
<Eljay> "Problems encountered: shit blew up" :zippy:
12-05-2007 08:12 PM
Profile PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
26 / Male / Flag
Joined: May 2006
RE: RE: My own msg with SendMessage
quote:
Originally posted by SpunkyLoveMuff
What exactly do you mean? That only sends one message...
He wants to send the encrypted message to his contact, while it shows the unencrypted message in his own client. You cannot do this (easily) with MP!L.
12-05-2007 08:26 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