chiners_68 Posted June 28, 2006 Posted June 28, 2006 (edited) Hi Guys, the install automation works fine but when It then automatically launches the window (title: Netscape 7.2) apears with the text asking if you want to make your default browser.ive set this as a winwaitactive but it dosent then do the Send commands i give. ive tried Tab, Enter to get to No. ive tried !n but it apears the window is not full active or send will not work with this window..anyone any ideas..here is my script so far. (It dosent go past the red text line); ----------------------------------------------------------------------------;; AutoIt Version: 3.1.0; Author: Mark Chinery;; Script Function:; Netscape install;; ----------------------------------------------------------------------------;Netscape InstallRun('"\\server\it$\Software\Other\Netscape 7.2\NSSetup-Full.exe"')WinWaitActive("Netscape 7.2 Setup - Welcome")Send("{ENTER}")WinWaitActive("Netscape 7.2 Setup - Software License Agreement")Send("{ENTER}")WinWaitActive("Netscape 7.2 Setup - Setup Type")Send("{ENTER}")WinWaitActive("Netscape 7.2 Setup - Select Additional Components")Send("{ENTER}")WinWaitActive("Netscape 7.2 Setup - Quick Launch")Send("{ENTER}")ControlClick("Netscape 7.2 Setup - Additional Options", "&Make Netscape.com my home page", 1076)Send("{ENTER}")WinWaitActive("Netscape 7.2 Setup - Start Install")Send("{ENTER}")WinWaitActive("Netscape 7.2")Send("!n")WinActive("Alert")Send("{ENTER}")WinWaitActive("Netscape")Winclose("Netscape") Edited June 28, 2006 by chiners_68
MHz Posted June 28, 2006 Posted June 28, 2006 (edited) My guess to cover for issues without installing Netscape. expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: Mark Chinery ; ; Script Function: ; Netscape install ; ; ---------------------------------------------------------------------------- ;Netscape Install Run('"\\server\it$\Software\Other\Netscape 7.2\NSSetup-Full.exe"') WinWaitActive("Netscape 7.2 Setup - Welcome") Send("{ENTER}") WinWaitActive("Netscape 7.2 Setup - Software License Agreement") Send("{ENTER}") WinWaitActive("Netscape 7.2 Setup - Setup Type") Send("{ENTER}") WinWaitActive("Netscape 7.2 Setup - Select Additional Components") Send("{ENTER}") WinWaitActive("Netscape 7.2 Setup - Quick Launch") Send("{ENTER}") ControlClick("Netscape 7.2 Setup - Additional Options", "&Make Netscape.com my home page", 1076) Send("{ENTER}") WinWaitActive("Netscape 7.2 Setup - Start Install") Send("{ENTER}") WinWaitClose("Netscape 7.2 Setup - Start Install", 5); Added WinWait("Netscape 7.2"); Added If Not WinActive("Netscape 7.2") Then; Added WinActivate("Netscape 7.2"); Added EndIf; Added WinWaitActive("Netscape 7.2") Send("!n") WinActivate("Alert"); WinActive to WinActivate WinWaitActive("Alert"); Added Send("{ENTER}") WinWait("Netscape"); removed ...Active as not needed Winclose("Netscape") Edited June 28, 2006 by MHz
herewasplato Posted June 28, 2006 Posted June 28, 2006 ...but it dosent then do the Send commands i give...MHz has given you good code to try... I thought that I might hazard a guess as to why your original code was not performing as you had hoped.From the help file under AutoItSetOption is an option setting named WinTitleMatchModeAlters the method that is used to match window titles during search operations.1 = Match the title from the start (default)2 = Match any substring in the title3 = Exact title match4 = Advanced mode, see Window Titles & Text (Advanced)In the default mode, a window title is matched from the start... so your script waited for a window with the title of "Netscape 7.2 Setup - Start Install"then sent the enter keythen immediately checked for a window with the title of"Netscape 7.2"then sent the alt-n keysAll of that happened before the window named "Netscape 7.2 Setup - Start Install" had a chance to become inactive. Most likely your script did send alt-n - it just sent it to the wrong screen.You could place this line near the top of your script and change the way that AutoIt matches window titles:AutoItSetOption ("WinTitleMatchMode", 3)then AutoIt would see "Netscape 7.2 Setup - Start Install" and "Netscape 7.2" as unique window title matches.Clear as Mud? [size="1"][font="Arial"].[u].[/u][/font][/size]
chiners_68 Posted June 28, 2006 Author Posted June 28, 2006 ive just had a thought... after the WinWaitActive("Netscape 7.2 Setup - Start Install") line there is several other windows that apear & go as it installs. maybe one of these windows is called "Netscape 7.2" & thus it tries to do the !n at the wrong window. how can I aditionally identify the window aswell as the "Netscape 7.2" the window dosent hold much inforation when i use the autoitwindow thing.
MHz Posted June 28, 2006 Posted June 28, 2006 Can you see "&Next" as the button text through AutoIt info for that window, then just use that as the window text parameter which should help with differencing it from one of the installing type windows.
ivan Posted June 28, 2006 Posted June 28, 2006 You can always use cmenu, a very useful tool posted in the forums that helps automating installations, and even perform them silently. Do a search and you'll find it. I've got netscape 8.1 and cmenu outputs the following info on the parameters the installer can be run with: Nullsoft ® Installer setup.exe /Option (All switches MUST be upper case. No double quotes) Install Options /D=x:\dirname Install program to path. /NCRC Skip CRC check. Display Options /S Silent mode. CMenu Options AutoIt Usage Create the Au3 template script. Edit any variables at the start of the script, and add shortcuts, that require deletion. Refer to the CMenu Help Guide. It displays sample highlighted items, to edit. Compile the script, into an exe, and keep it with the installer. Run the compiled exe, to install. Command line Usage To silently install, use the switch: Setup.exe /S I hope this helps. IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
MHz Posted June 29, 2006 Posted June 29, 2006 You can always use cmenu, a very useful tool posted in the forums that helps automating installations, and even perform them silently. Do a search and you'll find it.Good idea ivan to use silent install as the above script does no customing. Anyone can download CMenu from here if interested. This should be easier to use. RunWait('"\\server\it$\Software\Other\Netscape 7.2\NSSetup-Full.exe" /S')
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