somuchmars Posted May 1, 2017 Share Posted May 1, 2017 Hi, I haven't been using AutoIt in a long time and decided to use it for a small automation task. I have a Win8.1 64 bit machine and simply ran the first tutorial: Quote Run("notepad.exe")WinWaitActive("Untitled - Notepad")Send("This is some text.") The notepad window opens all right but there is no text written in the notepad application. Putting #requireadmin doesn't change the behavior. I have looked through the forum and stack overflow and have not found anything specific (besides maybe the issue of being on a win8.1 system). I must be doing something very wrong. Thanks in advance for your time. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 1, 2017 Moderators Share Posted May 1, 2017 @somuchmars I have run the example on everything from WIN7 to Win10 and back again, and it works for me. Is the Notepad window actually becoming active? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
somuchmars Posted May 1, 2017 Author Share Posted May 1, 2017 @JLogan3o13 Yes, the notepad window appears and then nothing, as in nothing gets written in that window. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 1, 2017 Moderators Share Posted May 1, 2017 Not only appears, but it is the active (on top) window? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
somuchmars Posted May 1, 2017 Author Share Posted May 1, 2017 Yes, it's active, i.e. on top. Link to comment Share on other sites More sharing options...
somuchmars Posted May 1, 2017 Author Share Posted May 1, 2017 @JLogan3o13 Yes, it's active, i.e. on top. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 1, 2017 Moderators Share Posted May 1, 2017 You could try something like this: Run("notepad.exe") Sleep(1000) WinWaitActive("Untitled - Notepad") Send("This is some text.") Or this: Run("notepad.exe") Sleep(1000) WinActivate("Untitled - Notepad") Send("This is some text.") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
somuchmars Posted May 1, 2017 Author Share Posted May 1, 2017 The second one works. Thank you very much ! @JLogan3o13 Link to comment Share on other sites More sharing options...
232showtime Posted May 2, 2017 Share Posted May 2, 2017 so the notepad is not active that's why its not working ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. 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