使用delphi或者別的技術怎麼寫?
謝謝賜教,送上50大分

解决方案 »

  1.   

    procedure TFrmMain.Timer2Timer(Sender: TObject);
    var
        H: HWND;
        text: array[0..255] of char;
        s: string;
    begin
        h := findwindow(nil, 'Internet Explorer 脚本错误'); //查找到窗口#32770,’#32770‘用spy++查出来的。    if H > 0 then SendMessage(h, WM_SYSCOMMAND, SC_CLOSE, 0);    h := findwindow(nil, 'Microsoft Internet Explorer'); //查找到窗口#32770,’#32770‘用spy++查出来的。
        if H > 0 then SendMessage(h, WM_SYSCOMMAND, SC_CLOSE, 0);    h := findwindow(nil, '添加到收藏夹'); //查找到窗口#32770,’#32770‘用spy++查出来的。
        if H > 0 then SendMessage(h, WM_SYSCOMMAND, SC_CLOSE, 0);    h := findwindow(nil, '安全警报'); //查找到窗口#32770,’#32770‘用spy++查出来的。
        if H > 0 then SendMessage(h, WM_SYSCOMMAND, SC_CLOSE, 0);
        h := findwindow(nil, 'Symantec AntiVirus 通知'); //查找到窗口#32770,’#32770‘用spy++查出来的。
        if H > 0 then SendMessage(h, WM_SYSCOMMAND, SC_CLOSE, 0);    h := GetActiveWindow();
        GetWindowText(h, @text, 255);
        s := strpas(text);
        if pos('Microsoft Internet Explorer', s) > 0 then SendMessage(h, WM_SYSCOMMAND, SC_CLOSE, 0);    //回位于最顶部的具有输入焦点的窗口句柄
    end;