hakermania
27th May 2011, 11:46
Hello.
I want to know if it is possible to grab somehow the mouse and detect the right, the left clicks and where in the screen they happened and store these values in an integer table like
int a [ 1, 123, 456 ]
for example this will mean that it was a right click (1) and happened at 123,456 (x,y)
After having stored those values I want to repeat these actions, something like a macro.
I know how to move the mouse to x,y, what I don't know is how actually to
1) grab the mouse for left and right clicks
2) Save the data from the "grabbing" in different variables every time and in the end, after the grabbing ends, how do I loop among them so as to repeat the action depending on the data stored?(actually C++ question, not Qt)
I don't want code ready to execute, I want a bit of guidance here, but sample code for better understanding is welcome.
Thx in advance for any answer :)
I want to know if it is possible to grab somehow the mouse and detect the right, the left clicks and where in the screen they happened and store these values in an integer table like
int a [ 1, 123, 456 ]
for example this will mean that it was a right click (1) and happened at 123,456 (x,y)
After having stored those values I want to repeat these actions, something like a macro.
I know how to move the mouse to x,y, what I don't know is how actually to
1) grab the mouse for left and right clicks
2) Save the data from the "grabbing" in different variables every time and in the end, after the grabbing ends, how do I loop among them so as to repeat the action depending on the data stored?(actually C++ question, not Qt)
I don't want code ready to execute, I want a bit of guidance here, but sample code for better understanding is welcome.
Thx in advance for any answer :)