几何尺寸与公差论坛

 找回密码
 注册
查看: 1786|回复: 0

【转帖】qq游戏自动挖矿vc源码

[复制链接]
发表于 2007-11-12 15:27:22 | 显示全部楼层 |阅读模式
void CQQDlg::OnTimer(UINT nIDEvent)
{
    // TODO: Add your message handler code here and/or call default
    if(!flag)
    {
        KillTimer(0);
        CQQDlg::shuangjishubiao();//双击鼠标
        flag = true;
        SetTimer(1,925000,NULL);
    }
    else
    {
        KillTimer(1);
        CQQDlg::dingyishubiaoweizhi();//定义鼠标位置
        flag = false;
        SetTimer(0,5000,NULL);
    }
    CDialog::OnTimer(nIDEvent);
}
void CQQDlg::Onwakuang()
{
    // TODO: Add your control notification handler code here
    zuobiao.x = 723;
    zuobiao.y = 376;
    //SetTimer(0,2000,NULL);
    //GetDlgItem(IDC_jiancha)->SetWindowText("未检测到" + m_banben);
    if(!CQQDlg::jiancha())
    {
        MessageBox("未检测到" +m_banben +",请启动游戏再挖矿");
    }
    else
    {
        SetTimer(0,2000,NULL);
    }

}

void CQQDlg::shuangjishubiao()
{
    mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
    mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
    mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
    mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}

void CQQDlg::dingyishubiaoweizhi()
{
    if(biaoshix<4)
    {
        zuobiao.x = zuobiao.x +40;
    }
    else
    {
        zuobiao.x = 723;
    }
    if(zuobiao.x == 723)
    {
        if(zuobiao.y < 536)
        {
            zuobiao.y += 40;
        }
        else
        {
            CDialog::OnCancel();
        }
        biaoshix = 0;
    }
    biaoshix++;//定义鼠标位置
    SetCursorPos(zuobiao.x,zuobiao.y);
}
BOOL CQQDlg:reTranslateMessage(MSG *pMsg)
{
    if(pMsg->message == WM_HOTKEY && pMsg->wParam == VK_F3)
    {
        AfxMessageBox("123");
    }
    return CDialog:reTranslateMessage(pMsg);
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-6-18 00:47 , Processed in 0.035972 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表