Sign in to follow this  
Followers 0
hordecore

Simply notepad automation

9 posts in this topic

i was following the tutorial in the autoit help it said by typing

WinWaitActive("Notepad", "Do you want to save")

Send("!n")

it will close the windows by pressing alt n but it didnt work the notepad didnt close

Share this post


Link to post
Share on other sites



This doesn't work on my Vista machine by the way, either.

This does:

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "")
Send("!n")

Enjoy your tawtawrial.

Vista and Win7 change the string?

Share this post


Link to post
Share on other sites

This doesn't work on my Vista machine by the way, either.

This does:

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "")
Send("!n")

Enjoy your tawtawrial.

why only WinWaitActive("Notepad", "")

works in vista? is it a bug?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Which happens like 0,00001% of the time. You can discriminate on so many parameters in the title.

Even if you can't, there's always WinGetText.

The parameter is kept for backwards compatibility, I think.

Edited by Manadar

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