Ok, that bit works. I've now got:
js code:
function OnWndWriterManageWindowsEvent_MessageNotification(objWnd, Message, wParam, lParam)
{
if (Message === 78)
{
var TmpNMHDR = Interop.Allocate(52);
Interop.Call("kernel32", "RtlMoveMemory", TmpNMHDR.DataPtr, lParam, 52);
if (TmpNMHDR.ReadDWORD(8) === -176)
{
var TmpEditHandle = WndWriterManageWindows.SendControlMessage("LstWindows", 4120, 0, 0);
var TmpEditLength = WndWriterManageWindows.SendControlMessage("LstWindows", 13, 0, 0);
var TmpEditText = Interop.Allocate(TmpEditLength);
var TmpEditCopied = WndWriterManageWindows.SendControlMessage("LstWindows", 14, TmpEditLength, TmpEditText.DataPtr);
AlertDialog("Message: " + Message + "\nNMHDR: " + TmpNMHDR.ReadDWORD(8) + "\n\nwParam: " + wParam + "\nlParam: " + lParam + "\n\nText: " + TmpEditText + "\nLength: " + TmpEditLength + "\nCopied: " + TmpEditCopied + "\nHandle: " + TmpEditHandle);
}
}
}
But the alert gives me this:
code:
Message: 78
NMHDR: -176
wParam: 8133
lParam: 457340
Text:
Length: 0
Copied: 0
Handle: 984598
The text value returns "" (an empty string).