我
我爱PASCAL
Unregistered / Unconfirmed
GUEST, unregistred user!
f1:=GetForegroundWindow;
f2:=GetWindowThreadProcessId(f1,nil);
AttachThreadInput(GetCurrentThreadId,f2,true);
f3:=getfocus;
AttachThreadInput(GetCurrentThreadId,f3,false);
if f3 = 0 then Exit;
SendMessage(f3, $0286, integer('A'), 0);
以上代码只能插入一个字符。
f2:=GetWindowThreadProcessId(f1,nil);
AttachThreadInput(GetCurrentThreadId,f2,true);
f3:=getfocus;
AttachThreadInput(GetCurrentThreadId,f3,false);
if f3 = 0 then Exit;
SendMessage(f3, $0286, integer('A'), 0);
以上代码只能插入一个字符。