Sign in to follow this  
Followers 0
mzilla

Windows 7 Send / MouseClick not working

8 posts in this topic

Hi everyone,

I seem to have problems with AutoIt's Send and MouseClick function not working. Literally nothing happens when I call these functions. I tried to start notepad, waited for the window to appear and then used Send() to type some text. This does not work. When I use ControlSend it does work. Only in the program I'm trying to automate I cannot use ControlSend because it's not build using Windows Controls.

Strange thing is that it used to work perfectly well, even with Windows 7, maybe Service Pack 1 broke it. I am currently using the latest version of AutoIt. I've tried to run the program as admin an added #RequireAdmin to the script but this does not seem to affect anything.

Hope someone can help me out, thanks!

p.s.: These are the code samples I used to test.

Not working:

Run("notepad.exe")
Sleep(1000)
Send("This is a line of text in the notepad window")
debug("DONE")
exit

Working code:

Run("notepad.exe")
Sleep(1000)
ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window")
debug("DONE")
exit

Share this post


Link to post
Share on other sites



Just tested at an identical computer running Windows 7 without SP1 and then Send and MouseClick work as expected. Currently updating that computer to SP1 to see if that breaks it.

Share this post


Link to post
Share on other sites

Just verified and it does not seem to be Windows 7 SP1 either. It still works on that PC and still does not work on another. On the computer where it does not work I have disabled and closed all background programs as well as other programs. Also UAC is off and AVG Antivirus disabled but still no luck. I do not know what else to try.

Share this post


Link to post
Share on other sites

strange... you say that UAC is disabled, but try this anyway... add #requireadmin at the top... i have win7 too but i never have that issue

Share this post


Link to post
Share on other sites

strange... you say that UAC is disabled, but try this anyway... add #requireadmin at the top... i have win7 too but i never have that issue

Thanks for the tip but I all ready did that and it doesn't seem to help :mellow: .

Share this post


Link to post
Share on other sites

Hi!

Debug was a function of mine that shows a MsgBox :mellow: . I have found the problem, it was caused because of the fact that I run Synergy ( http://synergy-foss.org/ ) a while a go and I totally forgot about it but it was still in the background! It seems to capture the input of the mouse and keyboard and that causes the problem.

Thanks for the help!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Exactly the same issue here with Synergy (and similarly forgot about this shelfware), lucky I found this!! Thanks

Edited by proTester

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