jgriner0918 Posted January 7, 2014 Share Posted January 7, 2014 (edited) Hello, So I have a little program that I'm writing to automate some installations. I have successfully written a file that can do Adobe Reader, but now I'm on to RealPlayer. My issue comes up near the end. After the program installs, a window pops up asking the user if he/she would like to upgrade to RealPlayer 16 Plus. I do not want to and would like to close that window. Here is my code: Run("RealPlayer.exe") WinWaitActive("RealPlayer Install Wizard", "END USER LICENSE AGREEMENT") Send("{ENTER}") Send("{TAB}{TAB}{TAB}{SPACE}{TAB}{TAB}{TAB}{TAB}{ENTER}") Sleep(40000) Send("{TAB}{TAB}{TAB}{ENTER}") MsgBox(0, "Close", "Should be closed") ProcessClose("RealPlayer.exe") The command after the Sleep(40000) aren't working. The message box pops up, but the "SEND" command doesn't seem to be doing anything. Any thoughts or ideas would be most appreciated. Thanks Edited January 7, 2014 by jgriner0918 Link to comment Share on other sites More sharing options...
l3ill Posted January 7, 2014 Share Posted January 7, 2014 (edited) Hi jgriner0918, and welcome to the forum! Almost all (if not all) active windows can be closed with ALT + F4 no silent installer available...? Edit: P.S. there are other more reliable ways to interact with windows using AutoIt. using the window info tool that comes with it and getting detailed info about the windows controls and then using ControlSend ControlClick etc... Bill Edited January 7, 2014 by l3ill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
Queener Posted January 7, 2014 Share Posted January 7, 2014 can you try putting #requireadmin on top of the line and see if that helps? Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
jgriner0918 Posted January 7, 2014 Author Share Posted January 7, 2014 (edited) Thanks guys, but I'm still stuck. The Alt+F4 trick didn't work. I have RequireAdmin at the top of the file. When I use the AutoIt Window Info program, the window that is giving me trouble has a generic title and no text, hidden or visible. I put a MsgBox in there to give me a breakpoint. If I actually click into the window and do the Alt F4, then it works, or if I click into the window then use the TABS, then it'll work. But somehow, when I try to do it automatically, it doesn't work. Edited January 7, 2014 by jgriner0918 Link to comment Share on other sites More sharing options...
l3ill Posted January 7, 2014 Share Posted January 7, 2014 Just an FYI, you do realize that your sleep is set to 40 seconds? You will have to find a way to interact with that window when it actually has focus and then use the ALT F4 (at least now you know it works) It just has to be active when you send the command. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example 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