Jump to content
Sign in to follow this  
somuchmars

Tutorial example simply not working

Recommended Posts

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. 

Share this post


Link to post
Share on other sites

@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!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

so the notepad is not active that's why its not working :lol:


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...