new to autoit

09/01/2008 19:31 LivingDead#1
Hello i have a simple question i just started playing with autoit and im having a problem already this is the very simple script i have so far

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("Whatever.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Do you want to save")
Send("!n")
i got it to work but i can not get it to close. is ! not the cmd for the ALT key?
thanks for any help.
09/01/2008 20:50 xxcoderxx#2
1) Check that the confirmation msg window is the same as ur title
2) if u think that everything is correct and u donno where is the error then i will tell u, u need to try to get focus on the window that u will send "!n" to. do that by WinActivate(),
that will be the code u need.
Quote:
Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("Whatever.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Do you want to save")
WinActivate("Notepad", "Do you want to save")
Send("!n")
09/02/2008 03:51 LivingDead#3
thanks :handsdown: