#NoTrayIcon
#region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=3DMark2001 SE.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Comment=没有注释啊!!!!
#AutoIt3Wrapper_Res_Fileversion=1.1.0.8
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=
#endregion ;**** 参数创建于 ACNWrapper_GUI ****
#include <GUIConstantsEx.au3>
HotKeySet("{ESC}", "Terminate")
WinMinimizeAll()
FileInstall("3DMark2001 SE.exe", "d:\3DMark2001 SE.exe", 0)
FileInstall("logo.jpg", "d:\logo.jpg", 0)
FileCreateShortcut("D:\迅捷科技主板测试软件.exe", @DesktopCommonDir & "\迅捷科技主板测试软件.lnk")
GUICreate("迅捷电脑主板测试软件", 350, 290, "-1", "-1")
$pic = GUICtrlCreatePic("d:\logo.jpg", 0, 0, 350, 50)
Global $Checkbox[4]
$Checkbox[1] = GUICtrlCreateCheckbox("是否开机运行", 65, 75, 250, -1)
GUICtrlSetFont($Checkbox[1], 15)
$Checkbox[2] = GUICtrlCreateCheckbox("是否循环", 65, 115, 250, -1)
GUICtrlSetFont($Checkbox[2], 15)
$Checkbox[3] = GUICtrlCreateCheckbox("检测完成是否关机", 65, 155, 250, -1)
GUICtrlSetFont($Checkbox[3], 15)
$Label = GUICtrlCreateLabel("制作", 280, 270, -1, -1)
$Button = GUICtrlCreateButton("开始测试", 65, 195, 250, 50)
ControlCommand("迅捷电脑主板测试软件","开始测试","$Button","IsChecked", "1")
GUISetState(@SW_SHOW)
While 1
Local $i
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button
$l = FileExists("D:\MadOnion.com\3DMark2001 SE\3DMark2001SE.exe")
If $l = 0 Then
Local $c = MsgBox(4, "未检测到3DMark2001 SE安装3DMark2001 SE", "是否安装3DMark2001 SE")
Select
Case $c = 6
FileExists("D:\MadOnion.com\3DMark2001 SE\3DMark2001SE.exe")
Run("D:\3DMark2001 SE.exe")
WinWait("3DMark2001 SE - InstallShield Wizard", "Click Next to install...")
WinActivate("3DMark2001 SE - InstallShield Wizard", "Click Next to install...")
ControlClick("3DMark2001 SE - InstallShield Wizard", "Click Next to install...", "Button2")
WinWait("InstallShield Wizard", "License Agreement")
WinActivate("InstallShield Wizard", "License Agreement")
ControlClick("InstallShield Wizard", "License Agreement", "Button2")
WinWait("InstallShield Wizard", "Choose Destination Location")
WinActivate("InstallShield Wizard", "Choose Destination Location")
ControlClick("InstallShield Wizard", "", "Button3")
Sleep(1000)
WinActivate("Choose Folder", "Please choose the installation folder.")
ControlSetText("Choose Folder", "Please choose the installation folder.", "Edit1", "d:\MadOnion.com\3DMark2001 SE")
ControlClick("Choose Folder", "Please choose the installation folder.", "Button1")
WinActivate("InstallShield Wizard", "Choose Destination Location")
ControlClick("InstallShield Wizard", "Choose Destination Location", "Button1")
WinWait("InstallShield Wizard", "Start Copying Files")
WinActivate("InstallShield Wizard", "Start Copying Files")
ControlClick("InstallShield Wizard", "Start Copying Files", "Button1")
WinWait("InstallShield Wizard", "MadOnion.com Registration")
WinActivate("InstallShield Wizard", "MadOnion.com Registration")
ControlClick("InstallShield Wizard", "MadOnion.com Registration", "Button3")
WinWait("InstallShield Wizard", "InstallShield Wizard Complete")
WinActivate("InstallShield Wizard", "InstallShield Wizard Complete")
ControlClick("InstallShield Wizard", "InstallShield Wizard Complete", "Button1")
ControlClick("InstallShield Wizard", "InstallShield Wizard Complete", "Button4")
Case $c = 7
Exit
EndSelect
EndIf
For $i = 1 To 4
If GUICtrlRead($Checkbox[$i]) = $GUI_CHECKED Then
If $i = 1 Then
RegWrite("HKLM\Software\Microsoft\windows\currentversion\run", "yunxing", "REG_SZ", "D:\迅捷科技主板测试软件.exe")
ElseIf $i = 2 Then
Run("D:\MadOnion.com\3DMark2001 SE\3DMark2001SE.exe")
WinWait("无标题 - 3DMark2001 SE", "")
WinActivate("无标题 - 3DMark2001 SE", "")
ControlClick("无标题 - 3DMark2001 SE", "Ch&ange...", "Button3")
WinWait("Options", "Loo&ping")
WinActivate("Options", "Loo&ping")
ControlClick("Options", "&Looping", "Button2")
WinActivate("Options", "Loo&ping")
ControlClick("Options", "OK", "Button7")
ControlClick("无标题 - 3DMark2001 SE", "&Benchmark", "Button9")
WinWait("3DMark2001 SE Overall Score", "")
WinActivate("3DMark2001 SE Overall Score", "")
ControlClick("3DMark2001 SE Overall Score", "C&lose", "Button6")
ElseIf $i = 3 Then
Shutdown(5)
EndIf
ElseIf GUICtrlRead($Checkbox[$i]) = $GUI_UNCHECKED Then
If $i = 1 Then
RegDelete("HKLM\Software\Microsoft\windows\currentversion\run", "yunxing")
ElseIf $i = 2 Then
Run("D:\MadOnion.com\3DMark2001 SE\3DMark2001SE.exe")
WinWait("无标题 - 3DMark2001 SE", "")
WinActivate("无标题 - 3DMark2001 SE", "")
ControlClick("无标题 - 3DMark2001 SE", "&Benchmark", "Button9")
WinWait("3DMark2001 SE Overall Score", "")
WinActivate("3DMark2001 SE Overall Score", "")
ControlClick("3DMark2001 SE Overall Score", "C&lose", "Button6")
EndIf
EndIf
Next
EndSwitch
WEnd
Func Terminate()
Exit
EndFunc ;==>Terminate
实在找不出来,高手帮忙看看是什么原因! |