M malaya Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-09 #1 想对另一程序中的编辑框赋值,并按下其确定按钮,应该如何操作啊?
H Hydra0 Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-09 #2 获取编辑框的句柄,再对其SendMessage就好了,确定按钮是同理<br>要是觉得获取句柄麻烦,那就模拟按键输入(好象也简单不到哪去...)
Y ysp娃娃 Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-09 #3 找到句柄 SendMessage 或SetWindowText
S sjrgame Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-09 #4 hw:=FindWindow(nil,PChar('软件窗体名称')) ;//找窗体<br>hw1:=GetWindow(hw,GW_CHILD);//找子窗体<br>SendMessage(hw1,BM_CLICK,0,0);//向目标控件发送click<br><br>//得到目标窗口的控件<br> GetClassName(hwnds,buffer,256);<br><br>GetWindowText(hw1,buffer1,100);//取caption文本
hw:=FindWindow(nil,PChar('软件窗体名称')) ;//找窗体<br>hw1:=GetWindow(hw,GW_CHILD);//找子窗体<br>SendMessage(hw1,BM_CLICK,0,0);//向目标控件发送click<br><br>//得到目标窗口的控件<br> GetClassName(hwnds,buffer,256);<br><br>GetWindowText(hw1,buffer1,100);//取caption文本