Sign in to follow this  
Followers 0
aantix

Mouse clicks & keystrokes; can the user interfere?

4 posts in this topic

1) If I have a series of controls that I want to send a series of mouseclicks and keystrokes to, will AutoIt relocate the mouse pointer in order to execute that mouseclick?

2) If the user is typing something while my program in the background is sending keystrokes to another system application, will those user keystrokes interfere with the keystrokes being sent to the other application?

3) If the receiving application is minimized, can it still receive mouse clicks and/or keystrokes?

Thanks for a great program! I look forward to your response.

Share this post


Link to post
Share on other sites



1) If I have a series of controls that I want to send a series of mouseclicks and keystrokes to, will AutoIt relocate the mouse pointer in order to execute that mouseclick? 

2) If the user is typing something while my program in the background is sending keystrokes to another system application, will those user keystrokes interfere with the keystrokes being sent to the other application?

3) If the receiving application is minimized, can it still receive mouse clicks and/or keystrokes?

Thanks for a great program! I look forward to your response.

1- yes.

2- yes, the clicks and key sends will hit the app on top. unless you either force the app you're controling to the front, or do it all with controlclick, controlsend and controlcommand.

3- yes, with controlclick, controlsend and controlcommand. check out those things in the helpfile, and to make you trip smoother through autoit lands I suggest you read the first 3 or 4 sections of the help file. (which shows up when you install the current version)

oh, and the faq is handy too... (it's pinned to the top of this forum, too lazy to make link)


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Don't be afraid to try things out and see for yourself .. it's the best way to learn :D

For example, to answer your first question you can fool around as follows ..

$sTitle = "Calculator"
    Run(@comspec & " /c calc.exe","",@SW_HIDE)

    WinActivate($sTitle)
    WinWaitActive($sTitle)

    ControlClick($sTitle, "","Button5",-1,5)

exit

From this, you can see that the mouse does not move.

Share this post


Link to post
Share on other sites

It is always a good idea block input if you have to use keyboard and mouse, because the user may make the stupidies things...

Try move the mouse fast around when mouseclick() should work and you'll that it will miss the poits that it should click.

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