Can anybody help me - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Can anybody help me (/showthread.php?tid=29157)
Can anybody help me by manuelnaranjo on 07-27-2004 at 04:14 AM
I want to make a plug-in to play a card game with my contacts.
I had design a card system that sends only numbers to the other contact.
Iīm using the ReceiveNotify, but the problem is that, the information that i send next to the Notify char is also shown in the chat window, and i donīt want that to happen.
Is there any way in wich i can send hidden information, between boths computers...
Thanks,
Manu
RE: Can anybody help me by RaceProUK on 07-27-2004 at 09:27 AM
The notify code is 5 characters long. If you can encode cards in 5 letter codes, that should work.
RE: Can anybody help me by Choli on 07-27-2004 at 01:53 PM
Noote that those 5 charachtes shouldn't be used to send information but to make a diference between several plugins installed. If you encode cards in the 5 characters you'll have 2 problems:
- When, inside ReceiveNotify, you receive a certain 5-letter code, how would you know if that code is one of yours or if it belongs to another plugin?
- When using those codes, you may use (wthout you noticing it) a code that is used by another plugin and that plugin, in its ReceiveNotify, recognices the code and does something (while it shouldn't do that) and your plugins isn't notified because there have already been another plugin who accepted the code
quote: Originally posted by manuelnaranjo
Is there any way in wich i can send hidden information, between boths computers..
well, after saying that, you'll see that there's no way of sending hidden info. You can try the 5 chars codes, but bear in mind what i've just said. Other ways of doing that are:
- Opening a socket in both computers and sending the info throught that socket. However this method isn't problem-free either, because the computers may be behind a router/nat, they may have a firewall, etc... and it's a lot of more work too
- Waiting until the Messenger Plus API allows that the received text in REceiveNotify can be edited before it's displayed. That would be a great improvment in the plus api and it has been suggested since plus supports plugins, however it isn't still added. Patcou said (i think) that he'll add it in the next version of the api, however i'm not very sure if he'll do it
RE: Can anybody help me by manuelnaranjo on 07-27-2004 at 07:18 PM
I donīt know how i didnīt think about it after.
What i made was instead of using a 5 characters notify code, iīm using 2 digits, in the third i send the number of the card (the game only have 3 cards per player), and in the last 2 charsīi send a number between 1 and 40 to identify my card.
But i'm also wondering, how may i manage to do the socket stuff you told me with VB6.
thanks
Manu
RE: Can anybody help me by Choli on 07-27-2004 at 08:34 PM
quote: Originally posted by manuelnaranjo
and in the last 2 charsīi send a number between 1 and 40 to identify my card.
remember that those 5 characters may be whatever character (well, not all, but nearly all), so you can, for example, encode that number from 1 to 40 using only 1 character and in that character you may be able to encode the card number too so you can put a 4-chars code and 1 char of data. That would be better because would reduce the problems I've said in my previous post
quote: Originally posted by manuelnaranjo
But i'm also wondering, how may i manage to do the socket stuff you told me with VB6.
that's quite complicated...you have to know about how to call APIs in VB6 and also you have to have a good knoweldge of WinSockets.... It's quite complex to explain it here (and now I don't have the needed time). Search about Winsock and Windows API in VB. You'll find lots of tutorials, sure; and it'd be easier when you get used to it
RE: Can anybody help me by (CyBeRDuDe) on 07-27-2004 at 08:37 PM
The socket programming might be problem if U haven't programmed with sockets before.. If U haven't then 'I suggest U search for some info about this and check it out... ...
You would also have to get the ip of one of the contacts and then send that to the other contact and make that contact connect to the first contact, and then play the game that way... ...
But this is not recommed unless U know about socket programming, or maybe it could be a good start for you..
As Choli said, using the notify code is not a good"/professionel" way of doing it, it can be used, but no one recommends that....
I don't know if there is any other way of sending "hidden" messages using MSN Api, it can easily be done using proxy or whatever.. but I haven't experimented so much in using notify in MSN Plus Plugin programming.... So I don't know exactly how it works or how good it works...
RE: Can anybody help me by Choli on 07-27-2004 at 08:44 PM
quote: Originally posted by (CyBeRDuDe)
any other way of sending "hidden" messages using MSN Api, it can easily be done using proxy or whatever..
i don't think it can be done with the msg api. With a proxy it's possible, of course, but imo coding a proxy is more difficult than coding an app that uses winsock
quote: Originally posted by (CyBeRDuDe)
using the notify code is not a good"/professionel" way of doing it, it can be used, but no one recommends that....
so true
|