What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP] Get cursor position (X, Y) & set window position (X, Y)

[HELP] Get cursor position (X, Y) & set window position (X, Y)
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y)
Where do you mean? In the chat window, you have the history area (where the sent and received messages are) and the typing area (where you type your messages).

For the first one, there are ChatWnd.HistoryText_GetCurSelStart() and ChatWnd.HistoryText_GetCurSelEnd() functions which let you get the current selection in the history. However, it is not possible to set the selection there.
For the second one, you can use ChatWnd.EditText_GetCurSelStart() and ChatWnd.EditText_GetCurSelEnd() to retrieve the selection and use ChatWnd.EditText_SetCurSel(Start, End) to set it.

Note: if the start and end of a selection are equal, it means that the typing cursor is at that position and has nothing selected. That's what your flickering vertical line is. ;)

Although I don't really understand what you mean with "setting the window's position to the cursor's"... :-/

This post was edited on 05-15-2008 at 04:23 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-15-2008 04:21 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-15-2008 at 04:11 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by Matti on 05-15-2008 at 04:21 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-15-2008 at 04:29 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by Volv on 05-15-2008 at 04:31 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-15-2008 at 04:33 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by Matti on 05-15-2008 at 04:38 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-15-2008 at 04:42 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by Matti on 05-15-2008 at 05:53 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-15-2008 at 07:25 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by matty on 05-15-2008 at 07:59 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-15-2008 at 08:07 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by matty on 05-15-2008 at 09:16 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-16-2008 at 02:55 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by mynetx on 05-16-2008 at 03:10 PM
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y) - by SmokingCookie on 05-16-2008 at 03:13 PM


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