coca Posted December 2, 2006 Share Posted December 2, 2006 This is my first AutoIt script I am trying to great. so that during my installation for windows it installs picasa for me. so far it seems that every window that comes up as the same title. Which is fine until after install then it shows the bar for progress of the installation. For some reason:( during this point it sends my send commands and doesn't do it on the next windows as I want it too. Hope this makes since. code below is Run("picasa.exe") WinWait("Picasa2 Setup") If Not WinActive("Picasa2 Setup") Then WinActivate("Picasa2 Setup") WinWaitActive("Picasa2 Setup") Send("{ENTER}") WinWait("Picasa2 Setup") If Not WinActive("Picasa2 Setup") Then WinActivate("Picasa2 Setup") WinWaitActive("Picasa2 Setup") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") WinWait("Picasa2 Setup") If Not WinActive("Picasa2 Setup") Then WinActivate("Picasa2 Setup") WinWaitActive("Picasa2 Setup") Send("{TAB}") Send("{SPACE}") any help would be great Link to comment Share on other sites More sharing options...
MHz Posted December 2, 2006 Share Posted December 2, 2006 The Winzip tutorial uses text and that is something you need as the installing window has the same title as well which is making your script fail. This may work better for you as it use Control* functions. Opt('TrayIconDebug', 1) ; Check working directory If @WorkingDir <> @ScriptDir Then FileChangeDir(@ScriptDir) EndIf $pid = Run("picasa.exe") $title = "Picasa2 Setup" WinWait($title, "License Agreement") ControlClick($title, "License Agreement", "Button2"); I Agree WinWait($title, "Choose Install Location") ControlClick($title, "Choose Install Location", "Button2"); Install WinWait($title, "Click Finish to close this wizard") ControlCommand($title, "Click Finish to close this wizard", "Button5", "UnCheck"); Create Desktop Shortcut ControlCommand($title, "Click Finish to close this wizard", "Button6", "UnCheck"); Create QuickLaunch Shortcut ControlCommand($title, "Click Finish to close this wizard", "Button7", "UnCheck"); System Tray at Startup ControlCommand($title, "Click Finish to close this wizard", "Button4", "UnCheck"); Run Picasa ControlCommand($title, "Click Finish to close this wizard", "Button8", "UnCheck"); Google As Default Search Engine ControlClick($title, "Click Finish to close this wizard", "Button2"); Finish ProcessWaitClose($pid) The Window Info Tool has the information to make the installation script. Window Title = Red Window Text = Green ClassnameNN = Blue CODE Window 1 >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Picasa2 Setup Class: #32770 Size: X: 548 Y: 403 W: 503 H: 393 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 907 Y: 769 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xF9F9F8 Dec: 16382456 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 324 Y: 327 W: 75 H: 23 Control ID: 1 ClassNameNN: Button2 Text: I &Agree Style: 0x50010001 ExStyle: 0x00000004 >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< I &Agree Cancel Nullsoft Install System v2.0 Nullsoft Install System v2.0 License Agreement Please review the license terms before installing Picasa2. Press Page Down to see the rest of the agreement. Picasa End User License Agreement #ce Window 2 >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Picasa2 Setup Class: #32770 Size: X: 548 Y: 403 W: 503 H: 393 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 906 Y: 768 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xFBFBFA Dec: 16514042 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 324 Y: 327 W: 75 H: 23 Control ID: 1 ClassNameNN: Button2 Text: &Install Style: 0x50010001 ExStyle: 0x00000004 >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< < &Back &Install Cancel Nullsoft Install System v2.0 Nullsoft Install System v2.0 Choose Install Location Choose the folder in which to install Picasa2. Printable Version... C:\Program Files\Picasa2 B&rowse... Space available: 26.2GB Space required: 21.0MB Setup will install Picasa2 in the following folder. To install in a different folder, click Browse and select another folder. Click Install to start the installation. Destination Folder Window 3 >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Picasa2 Setup Class: #32770 Size: X: 906 Y: 637 W: 503 H: 393 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 1287 Y: 1002 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xFBFBFA Dec: 16514042 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 324 Y: 327 W: 75 H: 23 Control ID: 1 ClassNameNN: Button2 Text: &Finish Style: 0x50010001 ExStyle: 0x00000004 >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< < &Back &Finish Cancel Completing the Picasa2 Setup Wizard Picasa2 has been installed on your computer. Click Finish to close this wizard. &Run Picasa2 Create Shortcut on Desktop Add Shortcut to Quick Launch Show System Tray Icon at Startup Set Google as my default search engine in Internet Explorer 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