JoeN99 Posted April 1, 2014 Posted April 1, 2014 Hello - I am new to using Autoitv3 and am running into a problem for which I am hoping one of you experts might have a solution. The program I am installing with the Autoit script uses an older version of InstallShield and the Autoit Info does not see any of the controls or text on any of my program’s windows. All of the windows of my program have the same text in the Window Titles (all have the "A Installer" title). My problem: The Autoit script for installing the product runs fine until the last window (the one that appears after the program has run successfully for about an hour). When the program gets to that last window, it does not go any further – seems to wait for me to issue a command. Listed below is the code I have tried. What would you suggest I do to get my script to recognize that it needs to continue onto the last screen and click Next button after the hour long install is done? ;These are the commands that successfully kick off my program install sleep(2000) Send("!n") sleep(2000) Send("!n") ; These are the commands that fail get the program to access the final window after it had run for an hour or so sleep(300000) WinActivate("A Installer") WinWaitActive("A Installer") sleep(2000) Send("!n") Thanks, Joe
Moderators Melba23 Posted April 1, 2014 Moderators Posted April 1, 2014 JoeN99,Welcome to the AutoIt forum. But please pay attention to where you post - the "Developer Chat" section where you started this thread is not for general support questions. I have moved the thread for you, but would ask you to be more careful in future. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
ZacUSNYR Posted April 1, 2014 Posted April 1, 2014 Although your commands have worked, they are not too fool proof. Using sleep between send commands is very unreliable. You should be waiting for your next expectation before kicking off the next command. What if someone clicks off the install program? What if something running takes focus? WinExists() WinActivate() ControlSend() ControlClick()
JoeN99 Posted April 1, 2014 Author Posted April 1, 2014 No, unfortunately the text cannot be viewed by the Autoit Info program - only the Title is viewed. The Info does list title,class, position, size, style, exstyle and handle - but that information is the same for each window when my program runs. Would you be able to provide any examples of what script commands that could resolve the issue might look like in the script? Melba23, Thank you for moving my thread for me.
Bert Posted April 1, 2014 Posted April 1, 2014 I believe he said install shield. If that is the case have you tried to see if the exe supports command line switches? The Vollatran project My blog: http://www.vollysinterestingshit.com/
JoeN99 Posted April 1, 2014 Author Posted April 1, 2014 What would be the best way for me to determine if command line switches are supported by my program? If they are, which switches would you suggest I use? Thanks.
ZacUSNYR Posted April 2, 2014 Posted April 2, 2014 You may need to extract the installer and run setup.exe directly. I'm not sure how the file is packaged. If it's called setup.exe try running setup /r Install. Afterwards go to your c:windows folder and look for setup.iss. Move that to the install folder. Uninstall the app and then run setup /s
JoeN99 Posted April 2, 2014 Author Posted April 2, 2014 I will have an opportunity to try those steps you listed tonight. Thank you for the suggestion.
jdelaney Posted April 2, 2014 Posted April 2, 2014 (edited) To get params: setup.exe /? Even if the silent options are available, depending on the developers of the actual app, there may be some input require. Edited April 2, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
JoeN99 Posted April 3, 2014 Author Posted April 3, 2014 My executable is named install.exe but unfortunately install /? or install /r both yield an error saying that they are invalid command line options. Seems the version the install was built in does not support them. --- Would there be another way for the install program to recognize that it needs to continue onto the last screen and click the Next button after the install has been running for awhile? Thanks.
ZacUSNYR Posted April 3, 2014 Posted April 3, 2014 Do you have 7zip installed? Extract it to a folder, find setup.exe in one of the folders on the inside and try to run the automate parameters. Sounds like a wrapper that isn't setup to pass on the parameters.
Solution JoeN99 Posted April 5, 2014 Author Solution Posted April 5, 2014 When I unzipped the exe, it did not contain a setup exe or any other exe I could run directly. In meantime, I tried some other tests and found a way for the last buttons of my program to be pressed. I was using too small a sleep. Also, when I added a msgbox to the end, I found that it has focus on last window of my program. I added timeout to it and then instructed it to click the Next and Finished buttons and it performed those steps consistently. ** Issue is now resolved My thanks to all of you for assisting me in finding a solution . sleep(1080000) ; sleep 18 minutes from start of run at last command MsgBox($MB_ICONQUESTION, "A Installer", "Script is about to press the Finished button",10) sleep(2000) Send("!n") sleep(2000) Send("!f")
jdelaney Posted April 5, 2014 Posted April 5, 2014 Sleeps would hardy be the best answer. WinWait with a timeout would be WAY better. Not to mention looping for the finish button, and then looping for the finish button to be enabled would be way better also. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
JoeN99 Posted April 12, 2014 Author Posted April 12, 2014 Would I still be able to loop to the Finish button even if Autoit cannot see it?
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