By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,421 Members | 1,128 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,421 IT Pros & Developers. It's quick & easy.

Make mouse click

100+
P: 134
is there a way to make the mouse "click"

the reason is i want to make an app that will automatically click on something

thanks
Jun 11 '07 #1
Share this Question
Share on Google+
6 Replies


ilikepython
Expert 100+
P: 844
is there a way to make the mouse "click"

the reason is i want to make an app that will automatically click on something

thanks
You're using the Windows API right? Try this function.
Jun 11 '07 #2

100+
P: 134
You're using the Windows API right? Try this function.
thanks for the reply, but "LPINPUT" was undeclared.

i included "Winuser.h and "Windows.h"
i also put User32.lib in the library directorys.

thanks again
Jun 12 '07 #3

ilikepython
Expert 100+
P: 844
thanks for the reply, but "LPINPUT" was undeclared.

i included "Winuser.h and "Windows.h"
i also put User32.lib in the library directorys.

thanks again
Hmm, I'm not sure what's the problem so could you please post the code that you used.
Jun 12 '07 #4

100+
P: 134
the only thing i did was added "
UINT SendInput(
UINT nInputs,
LPINPUT pInputs,
int cbSize
);
"
into my script (with nothing much in it) just to see if it worked
Jun 12 '07 #5

ilikepython
Expert 100+
P: 844
the only thing i did was added "
UINT SendInput(
UINT nInputs,
LPINPUT pInputs,
int cbSize
);
"
into my script (with nothing much in it) just to see if it worked
nInputs, pInputs, and cbSize are parameters. You need to pass them to the function. Did you declare them?
Jun 12 '07 #6

100+
P: 134
nInputs, pInputs, and cbSize are parameters. You need to pass them to the function. Did you declare them?
o- i see, thanks a lot
Jun 14 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.