mzilla Posted August 26, 2011 Share Posted August 26, 2011 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 Link to comment Share on other sites More sharing options...
mzilla Posted August 26, 2011 Author Share Posted August 26, 2011 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. Link to comment Share on other sites More sharing options...
mzilla Posted August 26, 2011 Author Share Posted August 26, 2011 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. Link to comment Share on other sites More sharing options...
monoscout999 Posted August 26, 2011 Share Posted August 26, 2011 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 Link to comment Share on other sites More sharing options...
mzilla Posted August 26, 2011 Author Share Posted August 26, 2011 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 issueThanks for the tip but I all ready did that and it doesn't seem to help . Link to comment Share on other sites More sharing options...
monoscout999 Posted August 26, 2011 Share Posted August 26, 2011 Run("notepad.exe") winwaitactive("[CLASS:Notepad]") ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window") consolewrite("DONE"&@CRLF) exit sorry.. but can you try this. what is DEBUG()? Link to comment Share on other sites More sharing options...
mzilla Posted August 26, 2011 Author Share Posted August 26, 2011 Hi! Debug was a function of mine that shows a MsgBox . 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! Link to comment Share on other sites More sharing options...
proTester Posted July 5, 2012 Share Posted July 5, 2012 (edited) Exactly the same issue here with Synergy (and similarly forgot about this shelfware), lucky I found this!! Thanks Edited July 5, 2012 by proTester Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now