Sign in to follow this  
Followers 0
zenn68

Newb question

3 posts in this topic

I'm having a bit of a go with the Notepad tutorial on the site.

I'm following along with the instructions.

after typing in each line I hit F5 to test it.

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

All is good

Send("This is some text.")

At this point I hit F5 and instead of the script running, it pastes the quoted text into the next line of the script.

Such as.

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("This is some text.")

This is some text.

Share this post


Link to post
Share on other sites



it works for me..

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'm having a bit of a go with the Notepad tutorial on the site.

I'm following along with the instructions.

after typing in each line I hit F5 to test it.

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

All is good

When you run notepad, it takes FOCUS away from SciTE and puts it on the new instance of notepad.

Then, you put the FOCUS back on SciTE to type in the next line and hit F5...

Send("This is some text.")

At this point I hit F5 and instead of the script running, it pastes the quoted text into the next line of the script.

Because SciTE had FOCUS, that's where the Send() text went.

To send to a specific window regardless of whether it has focus or not, use ControlSend() instead of Send().

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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