Jump to content
Sign in to follow this  
hordecore

Simply notepad automation

Recommended Posts

hordecore

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
WolfWorld

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
hordecore

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
jvanegmond

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.