C
cnhngujun
Unregistered / Unconfirmed
GUEST, unregistred user!
我是一个delphi的新手,有一本杂志介绍一个QQ辅佐发送工具
我照着输入到delphi7中,却无法执行完整;
procedure TForm1.BitBtn1Click(Sender: TObject);
var hparent,hbutton,hmemo:hwnd;
begin
Memo1.SelectAll;
memo1.CopyToClipboard;
try
hparent:=findwindow(nil,'对话模式');
hmemo:=childwindowfrompointex(hparent,point(50,350),cwp_all);
hbutton:=findwindowex(hparent,0,nil,'送讯息(&S)');
if (hparent=0) or (hmemo=0) or (hbutton=0) then
messagebox(handle,'error','error',mb_iconwarning[red])//此处经常发生错误,但如果
//打开qq发送消息窗口不做任何事倒也 能行
//但qq发送消息窗口老是提示'不能发送空消息'
//我查看了Clipboard,里面有我的文本[/red]
else
begin
sendmessage(hmemo,WM_PASTE,0,0);//那一定是这里的问题了,
//但qq发送消息窗口老是提示'不能发送空消息'
sendmessage(hbutton,bm_click,0,0);
end;
except
messagebox(handle,'2','2',mb_iconwarning);
end;
end;
请各位大虾给个答案,谢了!!
我照着输入到delphi7中,却无法执行完整;
procedure TForm1.BitBtn1Click(Sender: TObject);
var hparent,hbutton,hmemo:hwnd;
begin
Memo1.SelectAll;
memo1.CopyToClipboard;
try
hparent:=findwindow(nil,'对话模式');
hmemo:=childwindowfrompointex(hparent,point(50,350),cwp_all);
hbutton:=findwindowex(hparent,0,nil,'送讯息(&S)');
if (hparent=0) or (hmemo=0) or (hbutton=0) then
messagebox(handle,'error','error',mb_iconwarning[red])//此处经常发生错误,但如果
//打开qq发送消息窗口不做任何事倒也 能行
//但qq发送消息窗口老是提示'不能发送空消息'
//我查看了Clipboard,里面有我的文本[/red]
else
begin
sendmessage(hmemo,WM_PASTE,0,0);//那一定是这里的问题了,
//但qq发送消息窗口老是提示'不能发送空消息'
sendmessage(hbutton,bm_click,0,0);
end;
except
messagebox(handle,'2','2',mb_iconwarning);
end;
end;
请各位大虾给个答案,谢了!!