Jump to content
Sign in to follow this  
Knightsman

Problems with Alt Key

Recommended Posts

Knightsman

Thanks in advance.

I just installed AutoIT and was going through the tutorials. I'm stuck on the "Simple Notepad Automation". I have Vista Business SP2. I cannot for the life of me get it to close and save the note pad. The screen comes up do you want to save, and the script just stops, but stays running in the processes. This is the code, and Its exactly the same as the tutorial, but the alt does not work. Please help! Thanks again.

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("This is some text.")

WinClose("Untitled - Notepad")

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

Send("!n")

Share this post


Link to post
Share on other sites
somdcomputerguy

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

The text part ('Do you want to save') is what's holding up the script, not the send part.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Knightsman

Awesome! That worked. What was the tutorial talking about? Did I miss something when it said to add it?

Thanks a bunch, now I can keep learning :graduated:

Share this post


Link to post
Share on other sites
somdcomputerguy

The example codes in the Help file were written before Microsoft changed the 'text' part that is now displayed.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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.