#include <GUIConstants.au3>
#include <GuiListView.au3>
#include <GuiStatusbar.au3>
#include <array.au3>
#include <process.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("TrayMenuMode", 1)
Global $path[1], $run[1], $checkall = 1
$title = "软件自动安装管理器 V1.0"
$build = "最后更新:2008-01-21"
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$AForm1 = GUICreate($title, 640, 430, 193, 125)
$Pic1 = GUICtrlCreatePic(@TempDir & "\logo.jpg", 3, 3, 634, 100, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE)
$Label1 = GUICtrlCreateLabel("请选项择您要安装的软件:", 10, 115, 139, 17)
$ListView1 = GUICtrlCreateListView("软件名称|说明|状态", 8, 130, 622, 193)
GUICtrlSendMsg($ListView1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES)
GUICtrlSendMsg($ListView1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
GUICtrlSendMsg($ListView1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_CHECKBOXES, $LVS_EX_CHECKBOXES)
_GUICtrlListView_SetColumnWidth($ListView1, 0, 150)
_GUICtrlListView_SetColumnWidth($ListView1, 1, 350)
_GUICtrlListView_SetColumnWidth($ListView1, 2, 118)
;$Edit1 = GUICtrlCreateEdit("", 8, 352, 617, 49, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))
;GUICtrlSetData(-1, "Edit1")
$Label2 = GUICtrlCreateLabel("欢迎访问:http://www.autoitx.com", 9, 331, 620, 20, BitOR(0x0300, $ss_sunken))
GUICtrlSetBkColor(-1, 0xffffff)
GUICtrlSetColor(-1, 0x0000FF)
$Button1 = GUICtrlCreateButton("关于(&A)", 176, 368, 81, 28)
$Button2 = GUICtrlCreateButton("全选/取消(&S)", 268, 368, 81, 28)
$Button5 = GUICtrlCreateButton("手动安装(&M)", 360, 368, 81, 28)
$Button3 = GUICtrlCreateButton("自动安装(&I)", 452, 368, 81, 28)
$Button4 = GUICtrlCreateButton("退出(&X)", 544, 368, 81, 28)
;~ GUICtrlSetOnEvent($Button1, "_about")
;~ GUICtrlSetOnEvent($Button2, "_cancel")
;~ GUICtrlSetOnEvent($Button3, "_autoinst")
;~ GUICtrlSetOnEvent($Button5, "_autoinst")
;~ GUICtrlSetOnEvent($Button4, "_exit")
$Label3 = GUICtrlCreateLabel("By Pcbar (C) 2008.01", 12, 376, 141, 20)
GUICtrlSetFont(-1, 10, 800, 0, "Arial")
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
Local $a_PartsRightEdge[3] = [400, 550, -1]
Local $a_PartsText[3] = [$title, @TAB & @YEAR & "年" & @MON & "月" & @MDAY & "日", @TAB & @HOUR & ":" & @MIN & ":" & @SEC]
$StatusBar1 = _GUICtrlStatusBar_Create($AForm1, $a_PartsRightEdge, $a_PartsText)
#EndRegion ### END Koda GUI section ###
GUISwitch($AForm1)
GUISetState(@SW_SHOW)
Dim $list
While 1
Sleep(250)
If BitAND(WingetState($title),8) and BitAND(WinGetState("关于", 'pcbar'), 2) And (Not BitAND(WinGetState("关于", 'pcbar'), 8)) Then
Beep(600, 100)
WinActivate("关于", "pcbar")
WinFlash("关于", 'pcbar', 3, 100)
EndIf
$mousepos = GUIGetCursorInfo($AForm1)
Switch $mousepos[4]
Case $Button1
_GUICtrlStatusBar_SetText($StatusBar1, "关于本软件。", 0)
Case $Button2
_GUICtrlStatusBar_SetText($StatusBar1, "选择所有/取消所有选择。", 0)
Case $Button3
_GUICtrlStatusBar_SetText($StatusBar1, "自动安装所有被选择的软件。", 0)
Case $Button4
_GUICtrlStatusBar_SetText($StatusBar1, "退出本软件。", 0)
Case $Button5
_GUICtrlStatusBar_SetText($StatusBar1, "手动安装软件。", 0)
Case $ListView1
_GUICtrlStatusBar_SetText($StatusBar1, "请选择要安装的软件。", 0)
Case Else
_GUICtrlStatusBar_SetText($StatusBar1, $title, 0)
EndSwitch
_GUICtrlStatusBar_SetText($StatusBar1, @TAB & @HOUR & ":" & @MIN & ":" & @SEC, 2)
WEnd
Func _exit()
Exit
EndFunc ;==>_exit