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:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [HELP] Get cursor position (X, Y) & set window position (X, Y)
To get the Caret position you can use the GetCaretPos. Now this is in relation to the Caret position in the text box you are typing in now the screen.

The IMConvInputHeight2 key located in the registry (HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger\PerPassportSettings\1959057673) tells you the height of the input box.

code:
var prePOINT = Interop.Allocate(8);
var newPOINT = Interop.Allocate(8);

MsgPlus.AddTimer('x', 100);

function OnEvent_Timer(sTimerId) {
    Interop.Call('user32', 'GetCaretPos', newPOINT);
    if ( newPOINT.ReadDWORD(0) !== prePOINT.ReadDWORD(0) || newPOINT.ReadDWORD(4) !== prePOINT.ReadDWORD(4) ) {
        Interop.Call('kernel32', 'RtlMoveMemory', prePOINT, newPOINT, 8);
        Debug.Trace('x : '+newPOINT.ReadDWORD(0)+'\ty: '+newPOINT.ReadDWORD(4));
    }
    MsgPlus.AddTimer('x', 100);
}

This post was edited on 05-15-2008 at 08:01 PM by matty.
05-15-2008 07:59 PM
Profile E-Mail PM 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