Please tell me how to simulate clicking LMB.
When I specify 'VK_TAB' or 'keyboard character' then everything works
but when I enter VK_LBUTTON nothing happens. Why is that?
After all, if you had written the wrong name for the button, the program would not have compiled at all.
Here is the code:
#include <iostream>
#include <Windows.h>
#pragma comment(lib,"user32")
using namespace std;
int main()
{
string txt;
for(int i=0;i <100;i++ ){
keybd_event (VK_LBUTTON,0,0,0);
cout << i <<endl;
Sleep(100);
}
return 0;
}