This idea may work. If you need actual codes, just post
This involves using Messenger API. Consult Messenger API help for related functions and how to add reference to Messenger API in C++ or Visual Basic. (Messenger API is included in Patchou's plug-in development zipfile)
This following applies for C++.
- Retrieve IMessenger3 interface from iMessengerObj in Plus!'s plug-in Initialize() function.
- When the event is fired, use IMessenger3's InstantMessage method and open a conversation window to a random contact (note: if the contact is not on your allow list, this will fail.).
- Use the ppMWindow in InstantMessage: Get ppMWindow's hWnd (ppMWindow's a IDispatch which you can use to retrieve IMessengerWindow, and then use get_HWND method), and use SetForegroundWindow to make it the foreground window.
- Now, use SendInput or keybd_event or even SendMessage to emulate keyboard input of "/away [message]". Don't forget to send Enter input.
- Close ppMWindow using its Close method.
And this is for VB.
- Get a MessengerAPI.Messenger from oMessenger in Plus!'s plug-in Initialize() function.
- When the event is fired, use MessengerAPI.Messenger's InstantMessage method and open a conversation window to a random contact (note: if the contact is not on your allow list, this will fail.).
- Use the the return value (a MessengerAPI.MessengerWindow) of InstantMessage: Get its HWnd property, and use SetForegroundWindow API to make it the foreground window.
- Now, use SendKeys or even SendMessage API to emulate keyboard input of "/away [message]". Don't forget to send Enter input.
- Close the conversation window using its Close method.
A little bit complicated, but that's what I can think of for now. Just give it a try if you want