Sign in to follow this  
Followers 0
lobomonh

Mouse Click without moving cursor

11 posts in this topic

Is it possible to simulate a mouse click without moving the cursor at all? I'm trying to create an app that will control another app like a user while letting the real user do w/e he/she wants with her real cursor

Share this post


Link to post
Share on other sites



controlclick

Share this post


Link to post
Share on other sites

controlclick

can you post an example please? The example in the document is a little bit confusing

Share this post


Link to post
Share on other sites

What about it do you not understand?

Share this post


Link to post
Share on other sites

What about it do you not understand?

I cant control position of the click. Like in a window, it just click wherever my cursor is at, not where I set the positions

Share this post


Link to post
Share on other sites

You specify the control that you want to click; that way you don't need to know its position. Use the autoit info tool to get the necessary information.

Share this post


Link to post
Share on other sites

You specify the control that you want to click; that way you don't need to know its position. Use the autoit info tool to get the necessary information.

The window has a screen where stuff are drawn, I want to be able to click on one of the drawn objects, is that possible?

Share this post


Link to post
Share on other sites

The window has a screen where stuff are drawn, I want to be able to click on one of the drawn objects, is that possible?

So where is the problem then? You have checked the helpfile right?

ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )

Share this post


Link to post
Share on other sites

So where is the problem then? You have checked the helpfile right?

The problem is that the ControlClick does click, but it doesnt click on the x,y coords that I set, it just clicks wherever the cursor is at. Is there anyway to fix this?

Share this post


Link to post
Share on other sites

Don't know if it will fit but you can click very fast and then remove cursor to where it was.

$pos=MouseGetPos()
MouseClick("left",200,200,1,0)
MouseMove($pos[0],$pos[1],0)

You could lock mouse input for the instant this is being done to ensure no interference by the user also.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0