本帖最后由 stevety 于 2010-04-26 12:46:01 编辑

解决方案 »

  1.   

    你也可以发到delphi分区里,
    双开双待~
      

  2.   


      HANDLE Wnd,CurrWnd;
      HDC    DDC;
      COLORREF Col;
      BYTE R,B,G;
      CRect rrect;
      CPoint point1;
    {
      Wnd=FindWindow("CnBox",NULL);
     if(Wnd!=0)
      
    {
      DDC==GetDC(Wnd);
      Col==GetPixel(DDC,732,504);
      R==GetRValue(Col);
      B==GetBValue(Col);
      G==GetGValue(Col);
      if ((R<=255)&& (R>250) && (G>233) && (G<240)&&(B>125)&&(B<130)
    {
      Col=GetPixel(DDC,726,507);
      R=GetRValue(Col);
      B=GetBValue(Col);
      G=GetGValue(Col);
      if ((R==0) and (B==0) and (G==0)
    {
      Col=GetPixel(DDC,727,514);
      R=GetRValue(Col);
      B=GetBValue(Col);
      G=GetGValue(Col);
      if ((R<=255)&& (R>=253)&& (G>200)&&(G<210)&&(B>10)&&(B<=15))
    {
      CurrWnd=GetForegroundWindow;
      if (CurrWnd==Wnd)
    {
      GetWindowRect(CurrWnd,&rrect);
      GetCursorPos(&point1);
      SetCursorPos(rrect.Right-70,rrect.Bottom-80);
      Sleep(100);
      mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
      Sleep(100);
      mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
      Sleep(100);
      SetCursorPos(point1.X,point1.Y);
      //mouse_event(MOUSEEVENTF_MOVE,rrect.Right-70,rrect.Bottom-80,0,0);
     }
    }
    }}
    }
    }
      

  3.   

    HANDLE Wnd,CurrWnd;
      HDC    DDC;
      COLORREF Col;
      BYTE R,B,G;
      CRect rrect;
      CPoint point1;
    {
      Wnd=FindWindow("CnBox",NULL);
     if(Wnd!=0)
      
    {
      DDC==GetDC(Wnd);
      Col==GetPixel(DDC,732,504);
      R==GetRValue(Col);
      B==GetBValue(Col);
      G==GetGValue(Col);
      if ((R<=255)&& (R>250) && (G>233) && (G<240)&&(B>125)&&(B<130)
    {
      Col=GetPixel(DDC,726,507);
      R=GetRValue(Col);
      B=GetBValue(Col);
      G=GetGValue(Col);
      if ((R==0) and (B==0) and (G==0)
    {
      Col=GetPixel(DDC,727,514);
      R=GetRValue(Col);
      B=GetBValue(Col);
      G=GetGValue(Col);
      if ((R<=255)&& (R>=253)&& (G>200)&&(G<210)&&(B>10)&&(B<=15))
    {
      CurrWnd=GetForegroundWindow;
      if (CurrWnd==Wnd)
    {
      GetWindowRect(CurrWnd,&rrect);
      GetCursorPos(&point1);
      SetCursorPos(rrect.Right-70,rrect.Bottom-80);
      Sleep(100);
      mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
      Sleep(100);
      mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
      Sleep(100);
      SetCursorPos(point1.X,point1.Y);
      //mouse_event(MOUSEEVENTF_MOVE,rrect.Right-70,rrect.Bottom-80,0,0);
     }
    }
    }}
    }
    }