2 registered members (AndrewAMD, Nymphodora),
972
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Simulate mouse clicks
[Re: alibaba]
#459234
04/30/16 10:17
04/30/16 10:17
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
No idea what you did, this works perfectly fine for me.
while(1)
{
if(key_l)
{
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0);
wait(1);
mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0);
}
wait(1);
}
|
|
|
Re: Simulate mouse clicks
[Re: alibaba]
#459236
04/30/16 10:27
04/30/16 10:27
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
MOUSEEVENTF is used so I dont have to get the current mouse pos. The x and y coords will be relative to the cur mouse pos which means passing 0 wont change the mouse pos at all. I guess you simply forgot to put a wait(1) between because this way the engine wont register any click but will stop any real mouse clicks from happening
|
|
|
|