Shoutbox

Some simple plugin questions - 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: Some simple plugin questions (/showthread.php?tid=17978)

Some simple plugin questions by IGx89 on 11-11-2003 at 01:30 AM

I've analyzed the C++ sample code, but I still have a few questions that I haven't found answers for yet:

  • How do I send messages to MsgPlus, like to change to a personalized status? The sample code completely covered responding to messages, but had nothing about sending messages.
  • What is the best way to perform an action every x seconds? Creating a separate thread?
  • Is it possible to auto-respond to questions from contacts?
  • What's the best way to retrieve the user's current status?

Thanks!
RE: Some simple plugin questions by IGx89 on 11-12-2003 at 08:12 PM

Come on, most of you should be able to answer at least the first question or two in your sleep! :)


RE: Some simple plugin questions by musicalmidget on 11-12-2003 at 08:42 PM

quote:
Originally posted by IGx89
Come on, most of you should be able to answer at least the first question or two in your sleep! :)

What makes you think that? :-/

:P
RE: Some simple plugin questions by Dj Zeraja on 11-13-2003 at 08:08 AM

you must go reading the plus file thats al or something almost awake i do not thinking richt if i wrong i'm sorry for that


RE: Some simple plugin questions by Predatory Kangaroo on 11-13-2003 at 08:48 AM

Well, no-one else is making a... constructive reply to this, so (even though i haven't made any plugins for a while) i will try.
If you want to change ur status, you should send back a command like /online where you would normally send back some text.
IIRC, no-one ever managed to build an auto-responder or get messenger plus to perform an action every x seconds, but if you can get one, make sure you share it with us all :)
You can retrieve the contact's current status using the IDispatch you're sent - i'm on my laptop at the minute, but when I get back home i'll post the wrapper class I generated for that.

P.S. You can make messenger perform a series of actions by sending back a string like: "/online#3#I'm off for a while now.#3#/away"
the 3s are the amount of seconds in between the commands (again, i'm not sure, but it's something like that).


RE: Some simple plugin questions by Choli on 11-13-2003 at 10:07 AM

quote:
Originally posted by IGx89
How do I send messages to MsgPlus, like to change to a personalized status? The sample code completely covered responding to messages, but had nothing about sending messages.
you only can send messages to plus when a user types a command like /x.... and plus calls your plugin to process the command. the way to do it is as PK said:
quote:
Originally posted by Predatory Kangaroo
you should send back a command like /online where you would normally send back some text.
quote:
Originally posted by Predatory Kangaroo
You can make messenger perform a series of actions by sending back a string like: "/online#3#I'm off for a while now.#3#/away"
Note that before each #3# you should put a new line. ie: you should send back:
code:
/online
#3#I'm off for a while now.
#3#/away

quote:
Originally posted by IGx89
What is the best way to perform an action every x seconds? Creating a separate thread?
if you wish to perform it when the user types a command (again, a command like /x....) the best you can do is use the syntax #X# as described before.
About creating a separate thread, ... well it depends on what you want to do. with a separate thread you won't be able to send messages back or things like that. however you should be able to play a sound every 2 seconds, for example.
quote:
Originally posted by IGx89
Is it possible to auto-respond to questions from contacts?
if they use your pluging to send those questions, yes it is; if not, sorry, you can't
quote:
Originally posted by IGx89
What's the best way to retrieve the user's current status?
Maybe with the messenger object that plus puts as a parameter in the functions like parsecommand?? I'm not sure.
RE: Some simple plugin questions by IGx89 on 11-16-2003 at 09:22 PM

Thanks for the responses :).

So, there is no way to make a custom status plugin, that will detect which applications are running and mark your status appropriately? I can't even use SendMessage or something? Shoot, that seems like something so basic :(.


RE: Some simple plugin questions by Choli on 11-16-2003 at 09:56 PM

Well, what you can do is and independent aplication from plus! ie: not a plugin for plus but an addon for messenger (like plus is). This way you'll be able to detect and set the status (using the messenger api)


RE: Some simple plugin questions by IGx89 on 11-16-2003 at 10:07 PM

I thought about that, but with all the problems I've heard there were with making MsgPlus compatible with Messenger, doing that might be too difficult :(


RE: Some simple plugin questions by Hah on 11-16-2003 at 10:29 PM

by patchou sending the OMessenger object in the intialise function, it is possible to detect and set msn status through the messenger API whenever you feel like it, it will even implement all events available in the MSN6 Type API, i know how to do this in VB6, dont have a clue how to do it in c++ though :D, you can even use the code example from my crappy ickle auto responder to send plus instrutions whenever you like, not just through plus plugin calls. however, i still dont know how to get the last sent message, although im working on it using the conversation history, however it will be messy and probably pointless, but i get so bored i do this stuff anyway.

Hah


RE: Some simple plugin questions by Predatory Kangaroo on 11-18-2003 at 12:10 PM

Well... there is one way you could do what you describe.
You can use the oMessenger object to create a new IM window (just to make sure there's somewhere to send it), then use SendKeys or the equivalent message in C++s SendMessage with the WM_KeyPress (I think).
You can use those to type out a /away message to a window.  Those are the only workarounds that i've seen or heard about though.

Hope that helps :)