-
-
[求助]这样写为何只能秒杀一部分(连连看的)
-
发表于:
2015-7-3 23:28
3626
-
// 连连看外挂.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "windows.h"
ULONG top=195;
ULONG left=26;
ULONG width=30;
ULONG length=35;
ULONG readadd=0x129f78;
BYTE num[11][19];//[11][19]
HWND hWnd=FindWindowA(NULL,"QQ游戏 - 连连看角色版");
HANDLE han;
void touch(int x,int y)
{
//Sleep(40);
SendMessage(hWnd,WM_LBUTTONDOWN,MK_LBUTTON,MAKELPARAM(x*width+left, y*length+top));
//Sleep(40);
SendMessage(hWnd, WM_LBUTTONUP, NULL, MAKELPARAM(x*width+left, y*length+top));
}
ULONG getnum(int x,int y)
{
return num[y][x];
}
void read()
{
ReadProcessMemory(han,(LPVOID)readadd,(LPVOID)num,11*19,NULL);
}
int _tmain(int argc, _TCHAR* argv[])
{
DWORD id;
GetWindowThreadProcessId(hWnd,&id);
han= OpenProcess( PROCESS_ALL_ACCESS, FALSE, id );
while(1)
{
for(int y=0;y<11;y++)
{
for(int x=0;x<19;x++)
{
read();
int p=getnum(x,y);
if(!p)continue;
for(int yc=0;yc<11;yc++)
{
for(int xc=0;xc<19;xc++)
{
if(p==getnum(xc,yc))
{
touch(x,y);
//Sleep(80);
touch(xc,yc);
}
}
}
}
}
}
return 0;
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课