我不知道那个EDIT的属性??? 
是不是要用到SOFTICE去跟踪到那个EDIT的句柄? 
得到句柄后就能发送字符串?

解决方案 »

  1.   

    var
      H:HWND;
    begin
      H:=FindWindow(nil,'aaa'); //查找目标窗口
      H:=FindWindowEx(H,0,'TEdit',nil);// 查找目标控件
      if H<>0 then
        sendmessage(H,WM_SETTEXT,0,lparam(PChar(Edit1.Text)));
    end;
      

  2.   

    总之,你能得到Edit的句柄就行了,不然有麻烦!
      

  3.   

    ShellExecute(0, 'open', '\\hl_poly_srv\net\netcheck\check997.exe',pchar(str),pchar(str1),0);這是發送消息(你的字符串)
    然后另一支程序用paramstr(1)來接收消息就可以了
      

  4.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Edit1: TEdit;
        procedure FormCreate(Sender: TObject);
      private
        aatom:atom;
        procedure hotkey(var msg:tmessage);message wm_hotkey;
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
    begin
      aatom:=globaladdatom('hotkey');
      RegisterHotKey(handle,aatom,MOD_ALT,vk_F12);
    end;
    procedure TForm1.hotkey(var msg:tmessage);
    var p:Tpoint;
        curwin:hwnd;
    begin
      if (msg.LParamHi=VK_F12) and (msg.LParamLo=MOD_ALT)  then
      begin
        getcursorpos(p);
        curwin:=windowfrompoint(p);
        sendmessage(curwin,wm_settext,0,integer(pchar('hello')));
      end;
    end;
    end.
    //思路,取得鼠标当前位置控件的句柄,定义一个热键(alt+F12),热键激活sendmessage给句柄坐在的控件发送命令设置内容//注:对于IE输入框无效
      

  5.   

    fei19790920(饭桶的马甲(抵制日货)) 的方法才是正确的。
      

  6.   

    可以先用资源查看器看看那个输入框的名称
    然后取得该控件的句柄csdn有自动扫雷的程序下载,原理差不多
      

  7.   

    hexenzhou(甲骨文) ( ) 难道我的方法有问题吗?你试试看