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);
}