Jump to content

Recommended Posts

Posted

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. 

  • Moderators
Posted

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!

Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...