4g3n7oo42o Posted August 24, 2008 Share Posted August 24, 2008 Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") WinClose("Untitled - Notepad") WinWaitActive("Notepad", "Do you want to save") Send("!n") <--- this is tha problem i cant get the programe to close i know its not anything major but i just need help on if there is another way i can get this to close before i move on to the next thing i would greatly appricate it Link to comment Share on other sites More sharing options...
dgarrett8 Posted August 24, 2008 Share Posted August 24, 2008 That does make it close... "I think, therefore I am"[size="1"]René Descartes[/size] Link to comment Share on other sites More sharing options...
Szhlopp Posted August 24, 2008 Share Posted August 24, 2008 (edited) Run("notepad.exe")WinWaitActive("Untitled - Notepad")Send("This is some text.")WinClose("Untitled - Notepad")WinWaitActive("Notepad", "Do you want to save")Send("!n") <--- this is tha problem i cant get the programe to close i know its not anything major but i just need help on if there is another way i can get this to close before i move on to the next thingi would greatly appricate itIf you're on Windows Vista this line won't work: "WinWaitActive("Notepad", "Do you want to save")".For some reason AutoIt can't read vista's message boxes. If you're on XP then I'm clueless Edited August 24, 2008 by Szhlopp RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
burners Posted August 24, 2008 Share Posted August 24, 2008 (edited) Try this right before the code AutoItSetOption("SendKeyDelay", 20) AutoItSetOption("SendKeyDownDelay", 50) or tell it to hold down alt then press N. Send("{! down}") Send("n") Send("{! up}") Edited August 24, 2008 by burners ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
burners Posted August 24, 2008 Share Posted August 24, 2008 dang didnt take vista in consideration. I dual boot XP for autoit programming. ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
4g3n7oo42o Posted August 24, 2008 Author Share Posted August 24, 2008 well burner i thank you for your insite but i still have the same problem. An i do have vista for that matter but everything workd fine just the closeing script. Ive tryed few of ur methods of holding down "!" and sending the n. Im going to look around a lil more to see what i can conjuer up and thx to the other ppl that did there best to help and oh yeah shzlopp so u think it that one line that making it not close cuz it pops up if i wanna save.... hmmmm ill see what i can do thx ppl Link to comment Share on other sites More sharing options...
burners Posted August 24, 2008 Share Posted August 24, 2008 (edited) The problem is in your win wait active. This works Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") WinClose("Untitled - Notepad") WinWaitActive("Notepad") Send("!n") Edited August 24, 2008 by burners ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
4g3n7oo42o Posted August 24, 2008 Author Share Posted August 24, 2008 Burner thank u so much +karmafor ya bro The problem is in your win wait active. This works Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") WinClose("Untitled - Notepad") WinWaitActive("Notepad") Send("!n") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now