Alleine 0 Posted September 3, 2007 Hi, It's the first time I use AutoScript. Well, I am trying to create a Alcohol 52 autoinstaller but I have a problem: $title = "Alcohol 52% FE Version 1.9.6.5429" Run("Alcohol52.exe") WinWait($title) ControlClick($title, "&Next >", "Button2") ControlClick($title, "I &Agree", "Button2") ControlClick($title, "Include the Alcohol Soft Toolbar (recommended).", "Button4") ControlClick($title, "&Next >", "Button2") ControlClick($title, "&Next >", "Button2") ControlClick($title, "&Install", "Button2") Here I should put a "wait" but I have tried with several words... ControlClick($title, "&Run Alcohol 52% >", "Button4") ControlClick($title, "&Finish >", "Button2") Sorry if I make a mistake but the spanish forum is desert... Thanks you Share this post Link to post Share on other sites
benners 54 Posted September 4, 2007 (edited) You can use winwait as previously used in your script. When using WinWait I also specify the text of the window so as to ensure the correct window is showing. I also make sure the window is active. Global Const $title = "Alcohol 52% FE Version 1.9.6.5429" Global Const $txt = 'Completing the Alcohol 52% Setup Wizard' Run("Alcohol52.exe") WinWait($title) ControlClick($title, "&Next >", "Button2") ControlClick($title, "I &Agree", "Button2") ControlClick($title, "Include the Alcohol Soft Toolbar (recommended).", "Button4") ControlClick($title, "&Next >", "Button2") ControlClick($title, "&Next >", "Button2") ControlClick($title, "&Install", "Button2") ; Added ------------------------------------------------- WinWait($title, $txt) WinWait($title, $txt) If Not WinActive($title, $txt) Then WinActivate($title, $txt) WinWaitActive($title, $txt) ; Added ------------------------------------------------- ControlClick($title, "&Run Alcohol 52% >", "Button4") ControlClick($title, $txt, "Button2") You can also the Scriptwriter to create a script for you, it records the window text and the mouse movements. Edited September 4, 2007 by benners Share this post Link to post Share on other sites