//API函數定義
[cpp] view plaincopy
function long SendMessage(ulong hWnd, uint msg, long wParam, ref string lParam) library "user32.dll" alias for "SendMessageA"
//取第row行的文本
[csharp] view plaincopy
constant long EM_GETLINE = 196
string ls
ulong length, row
row = 2 //取第幾行
ls = space(1000)
length = SendMessage(handle(mle_1), EM_GETLINE, row - 1, ls) //row - 1表示取得第row行的文本,0為起始
ls = trim(ls)
messagebox("取第" + string(row) + "行", "文本內容:" + ls + "~r~n文本長度:" + string(length))
摘自 yyoinge的專欄