Erhnam Posted August 9, 2005 Posted August 9, 2005 Autoit is a bit new for me but I'm wondering if this is possible (maybe you can also tell me how). As an Administrator I have to deal with an installation. This installation takes very long (almost 3 hours) and the only thing I need to do is install the first steps and then wait for maybe 100 pop-up windows and press the "ok" button or just hit Enter for each window. Do you think it would be possible to write a small app that just presses the OK button or hits enter when the pop-up window appears on the screen? Any help would be nice! Thanks!
Baku Posted August 9, 2005 Posted August 9, 2005 If i understood u rightly, its possible and not so hard to write.
Josbe Posted August 9, 2005 Posted August 9, 2005 Yes, it's possible.If you are new, initially you could try using some tools for record this routines, using Larry's ScriptWriter (ALT+F6), included in the Scite4AutoIt installation.Well, read the helpfile for any reference with unknown functions. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
rakudave Posted August 9, 2005 Posted August 9, 2005 the following functions might be usefull: WinWait ( "title" [, "text" [, timeout]] ) (just use autoit windows info to find out the text(or title) ) then use MouseClick ( "button" [, x, y [, clicks [, speed ]]] ) or Send("{ENTER}") good luck... Pangaea Ruler new, UDF: _GUICtrlCreateContainer(), Pangaea Desktops, Pangaea Notepad, SuDoku, UDF: Table
Stumpii Posted August 9, 2005 Posted August 9, 2005 Here is par of a script I use for program installatio. It runs a loop that checks if a certain window is shown and performs a specific action. The last step, once complete jumps out of the loop. This is not really a working example as it was culled from a large script, but will be a good starting point for you. The most useful functions used are 'ControlClick' and 'WinActive'. Look these up in the help. Use the 'AutoIt Window Info' program to determine the button names or window text. This is in the AutoIt start menu. Personally, I would not use MouseClick or Send, the 'ControlClick' is the way to go. expandcollapse popup$ThisIsLastWindow = 0 $SetupTitleBarName = "Blah Blah Setup" While 1 Sleep(500) ; Welcome Screen $WindowText = "Welcome to the" If WinActive($SetupTitleBarName, $WindowText) Then ; Click 'Next' button ControlClick($SetupTitleBarName, $WindowText, "&Next >") EndIf ; 'License Agreement' Screen $WindowText = "License Agreement" If WinActive($SetupTitleBarName, $WindowText) Then ; Click 'I accept' button ControlClick($SetupTitleBarName, $WindowText, "Button1") ; Click 'Next' button ControlClick($SetupTitleBarName, $WindowText, "&Next >") EndIf ; 'Ready to Configure' screen $WindowText = "Click Install to begin the installation." If WinActive($SetupTitleBarName, $WindowText) Then ; Click 'Install' button ControlClick($SetupTitleBarName, $WindowText, "&Install") EndIf ; 'Setup Complete' screen $WindowText = "Setup Complete" If WinActive($SetupTitleBarName, $WindowText) Then ; Click 'Next' button ControlClick($SetupTitleBarName, $WindowText, "Finish") $ThisIsLastWindow = 1 EndIf ;Quit loop if the previuos window the installer will raise If $ThisIsLastWindow = 1 Then ExitLoop WEnd Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.
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