Sign in to follow this  
Followers 0
somuchmars

Tutorial example simply not working

9 posts in this topic

#1 ·  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. 

Share this post


Link to post
Share on other sites



#2 ·  Posted

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

@JLogan3o13 Yes, the notepad window appears and then nothing, as in nothing gets written in that window.

Share this post


Link to post
Share on other sites

#4 ·  Posted

Not only appears, but it is the active (on top) window?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#5 ·  Posted

Yes, it's active, i.e. on top.

Share this post


Link to post
Share on other sites

#6 ·  Posted

@JLogan3o13  Yes, it's active, i.e. on top.

Share this post


Link to post
Share on other sites

#7 ·  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.")

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#8 ·  Posted

The second one works. Thank you very much ! @JLogan3o13

Share this post


Link to post
Share on other sites

#9 ·  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.

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