试试我的想法Dim $bt = "Microsoft Visual C++ 2008 Redistributable Setup",$a=0
Run("C2008sp1.exe")
Do
Sleep(1000)
If WinExists($bt, "Welcome to Microsoft Visual") Then $a=1
If WinExists($bt, "Select one of the options below") Then $a=2
If WinExists($bt, "Error: Another instance of setup is running") Then $a=3
Until $a<>0
If $a=1 Then
WinActivate($bt, "Welcome to Microsoft Visual")
ControlClick($bt, "Welcome to Microsoft Visual", "Button12")
WinWaitActive($bt, "Be sure to carefully read and understand all the rights and ")
ControlClick($bt, "Be sure to carefully read and understand all the rights and ", "Button11")
ControlClick($bt, "Be sure to carefully read and understand all the rights and ", "Button8")
WinWaitActive($bt, "It is highly recommended that you download and")
ControlClick($bt, "It is highly recommended that you download and", "Button2")
ElseIf $a=2 Then
WinActivate($bt, "Select one of the options below")
ControlClick($bt, "Select one of the options below", "Button9")
ControlClick($bt, "Select one of the options below", "Button7")
WinWaitActive($bt, "Setup Complete")
ElseIf $a=3 Then
WinActivate($bt, "Error: Another instance of setup is running")
ControlClick($bt, "Error: Another instance of setup is running", "Button11")
EndIf
Exit
|