What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Send Text to window

Pages: (2): « First [ 1 ] 2 » Last »
Send Text to window
Author: Message:
Hilikus
Junior Member
**


Posts: 27
42 / Male / –
Joined: Apr 2005
O.P. Send Text to window
I've been thinking about ways to send messages from my plugin to the remote user but the only one i had managed to make work is the SendMessage with WM_CHAR solution
BUT

thats not good for me, if youre writting something and that funcion is called it will interrupt whatever you're writting and send it, and you also need to have it as foreground window, setwindowtoforeground and then again to background is too ugly for me

i know there must be a way using the IDispatch parameter in PLUGIN_PARAM, msgplus does it for ReceiveNotify, has anyone been able to do this using this way or any other way besides sending WM_CHAR ??

Thanks
05-20-2005 12:00 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Send Text to window
Sending WM_CHAR messages? Sounds like you're writitng your own SendKeys. Mind you, it shouldn't be sending the message to your contact, even if you send a newline.
If you think it may be useful, look up Active Accessibility. You can use AccessibleObjectFromWindow on the HWND returned by the interface passed in the PLUGIN_PARAM (typecasted to IMessengerConversationWnd), then you can use the various other functions like AccessibleChildren to get the Input box, and set it's value.
It won't be simple, and will require testing and debugging. However, if you get it working, it'll be much better than SendKeys or WM_CHAR ;)
[Image: spartaafk.png]
05-20-2005 09:38 AM
Profile PM Web Find Quote Report
Hilikus
Junior Member
**


Posts: 27
42 / Male / –
Joined: Apr 2005
O.P. RE: Send Text to window
well, im using c++. from what i know, yes, i was creating my own sendKeys

about your method, wouldnt it also interfere with what the user is typing?? i think any way of entering text through the GUI is also going to affect what the user is writting
if the user is writting something and the plugin triggers, it will cut off what you are typing, no?

what about calling whatever function messenger calls when you press enter??



05-21-2005 09:33 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Send Text to window
If you get_accValue, append what you want to add, and set_accValue, that should just 'insert' into what the user is typing. The user can then carry on typing as before.

As for calling the function Messenger calls when you hit Enter: what exactly do you mean by this?
[Image: spartaafk.png]
05-22-2005 07:00 AM
Profile PM Web Find Quote Report
Hilikus
Junior Member
**


Posts: 27
42 / Male / –
Joined: Apr 2005
O.P. RE: Send Text to window
no, thats exactly what i DONT want
i dont want my plugin to interfere with what the user is writting

by using sendmessage you're cut off when you're writting because of the ENTER key being simulated

and by the funcion i mean, what messenger does when you send a message, maybe you can use that function to send your text, i dont know, a crazy thought
05-22-2005 08:29 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Send Text to window
SendMessage doesn't simulate the ENTER key unless you tell it to.
As for sending the text, use Active Accessibility to get the Send button, and make it do it's default action.
[Image: spartaafk.png]
05-22-2005 12:33 PM
Profile PM Web Find Quote Report
Hilikus
Junior Member
**


Posts: 27
42 / Male / –
Joined: Apr 2005
O.P. RE: Send Text to window
mmm i know, but you NEED to simulate the enter key to send the message

i dont know how to explain it, look
lets say you're typing "hello how are you"
h e l l o  h o] at this moment, the contact tells you hey, and the script triggers! and replies (by using sendMessage) i'm busy...
the message your contact will get is your message with the plugin message appended which would be
"hello hoi'm busy..." and it IS going to send it, because of the ENTER key sendmessage, you HAVE TO simulate enter, otherwise the script message is just going to be sitting there. and my worry is that with your suggestion of Active accessibility the same thing is going to happen, cause you're suggesting to use set_accValue

do you know if this is going to happend, the thing is i dont think is very easy to do this so i dont want to break my head trying to do it and and the end it doesnt work
05-22-2005 05:47 PM
Profile E-Mail PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Send Text to window
couldnt you get the current text in the input, save it in a variable, send the automessage and then put the variable contents back into the input
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
05-22-2005 05:50 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Send Text to window
Ahh, now I get what you mean!

The fix for that could be as follows:
- Get value from input box and store in temp variable
- Set value to automated reply
- Send
- Set value to what you stored in temp variable

Since this should happen very quickly, the user won't be interrupted while typing. In theory.

Edit: @Demps - Snap!

This post was edited on 05-22-2005 at 05:52 PM by RaceProUK.
[Image: spartaafk.png]
05-22-2005 05:51 PM
Profile PM Web Find Quote Report
Hilikus
Junior Member
**


Posts: 27
42 / Male / –
Joined: Apr 2005
O.P. RE: Send Text to window
k, im going to try that, but doesnt anybody know how msg plus does it???

that idispatch in plugin_param must have a purpose in it since you use it in receivenotify


saving the text and at the end loading it doesnt sound so bad, what i really dont like is that the window has to be active, and that changeactivewindow/write/changeactivetooriginalwindow i just dont like it, it looks bad and it bothers the user



This post was edited on 05-22-2005 at 08:10 PM by Hilikus.
05-22-2005 06:02 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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