A Simple Function
See this
[Highlight=C++]
int left_click()
{
int delay = 1;
start:
INPUT Input={0};
Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
::SendInput(1,&Input,sizeof(INPUT));
::ZeroMemory(&Input,sizeof(INPUT));
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
::SendInput(1,&Input,sizeof(INPUT));
Sleep(1000*delay);
goto start;
}
[/HIGHLIGHT]
A put that function into a program(Win32 GUI based) And when I execute the function my program get Not Responding.But the progra still cliking just dont respond anymore. :X
Have something wrong with it?
[Highlight=C++]
int left_click()
{
int delay = 1;
start:
INPUT Input={0};
Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
::SendInput(1,&Input,sizeof(INPUT));
::ZeroMemory(&Input,sizeof(INPUT));
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
::SendInput(1,&Input,sizeof(INPUT));
Sleep(1000*delay);
goto start;
}
[/HIGHLIGHT]
A put that function into a program(Win32 GUI based) And when I execute the function my program get Not Responding.But the progra still cliking just dont respond anymore. :X
Have something wrong with it?


.And @
