quote:
Originally posted by SmokingCookie
That's weird..
Could you try:
JScript code:
var length = (Interop.Call("User32.dll","SendMessageW",Edit,WM_GETTEXTLENGTH,0,0) + 1);
var Buffer = Interop.Allocate((length + 1) * 2);
var lResult = Interop.Call("User32.dll","SendMessageW",Edit,WM_GETTEXT,length,Buffer.DataPtr);
// MessageBox is a class in my script; use your AlertDialog instead
//MessageBox.Show("Copied\t: " + lResult + "\nLength\t: " + length);
Works for me.
Nb: the length variable contains (GetTextLengthResult + 1)!
Didn't work at first - said "Edit" was undefined. I assumed that was the handle of the ListViewControl - WndWriterManageWindows.SendControlMessage("LstWindows", 4120, 0, 0); - but I end up with the following message:
code:
Copied : 11
Length : 1
The "Copied" value is actually the length, and "Length" always returns "1" (a number, not a string - a boolean, maybe?). Any more ideas?