1
Window / Re: simulating mouseClick
« on: January 22, 2024, 10:41:39 am »
thank you very much for your comment.
I did not understand your question "How is the mouse simulated?"
I thought "mouse simulated" means using relevant function. In my case Mouse::isButtonPressed
From your question I suspect that apart from using function like Mouse::isButtonPressed or event, mouse simulation requires more than just using function or event - is this the case?
PS. I tried to use C++ built-in function GetAsyncKeyState(). For some reason it even in the simplest test-code for Left Click like
But for the Right button GetAsyncKeyState(0x02) works fine
I did not understand your question "How is the mouse simulated?"
I thought "mouse simulated" means using relevant function. In my case Mouse::isButtonPressed
From your question I suspect that apart from using function like Mouse::isButtonPressed or event, mouse simulation requires more than just using function or event - is this the case?
PS. I tried to use C++ built-in function GetAsyncKeyState(). For some reason it even in the simplest test-code for Left Click like
int main()
{
Sleep(100);
if(GetAsyncKeyState(0x01))
{
cout<<"mouse"<<endl;
}
}
it behave not as expected (no mater which integer I put inside Sleep();{
Sleep(100);
if(GetAsyncKeyState(0x01))
{
cout<<"mouse"<<endl;
}
}
But for the Right button GetAsyncKeyState(0x02) works fine