用AU3做自己的漂亮游戏菜单

来源:百度文库 编辑:神马文学网 时间:2024/04/29 13:32:12
用AU3做自己的漂亮游戏菜单2009-12-26 00:03 #include
#include
#include
#include
#include "ExtractIconToFile.au3"
#include
#include
#include
#include                                            ;上面的这些为程序需要的AU3内置函数模块
Opt("WinTitleMatchMode",4)
Opt("TrayMenuMode", 1)
$Version = "MEUN1.1"                                          ;程序的进程名
If WinExists($Version) Then
MsgBox(64, "系统提示:", "游戏菜单已经在运行当中.")            ;检测程序是否运行
Exit
endif
TraySetToolTip("网管之星游戏菜单")   ;系统托盘图标提示信息
AutoItWinSetTitle($Version)
Global $Form1, $ListView, $Dll, $Button1, $Button2, $Button3, $Button4, $Button5, $Button6, $Button7, $Button8, $Button9, $Button10, $Button11, $Button12, $Button13
Global $config[1], $menu_msg, $hWndLV2, $devmgr2, $devmgr3
Global $admin, $menu1, $devmgr, $aboutitem,$CMD1,$CMD2,$fixico,$data7="2048"               ;赐值全局变量

if not FileExists(""& @ScriptDir &"\menu.dat") Then            ;检测皮肤需要运行库是否存在,不存在就释放一个出来,menu.dat为专业皮肤SkinCrafterDll的3.1破解版本zhunaoke自行破解的.需要C++2005运行库的支持
FileInstall("e:\soft\Au3\游戏菜单\menu.dat", ""& @ScriptDir &"\menu.dat")
EndIf
$config=iniread(""& @ScriptDir &"\data\config.ini", "config", "config", "")    ;读基本配置信息
If @error Then
MsgBox(4096, "", "配置文件丢失.")
exit
endif
$config=StringSplit(""& $config &"", ";");
Global $Close1 = ""& $config[4] &"", $Close2 = ""& $config[5] &"",$WIDTH = ""& $config[2] &"", $HEIGHT =""& $config[3] &""
Global $MENU_TYPE=StringSplit($config[6],"|"), $skin = ""& $config[1] &""
Global $key = StringRight($config[9], 4)
Global $Key_PASS = StringTrimRight($config[9],4)
Global $PASS =_StringEncrypt(0,$Key_PASS,$key,2)
Global $MENU_name=$config[7]
Global $Ndst=$config[8]                                                              ;以上几行把读取的基本配置信息赐值给全局基本变量
Dim Const $Tray_=iniread(""& @ScriptDir &"\data\config.ini", "config", "公告", "")    ;读取公告信息
If $Tray_ <> "" Then          ;判断公告信息是否存在,存在的话就显示.
TrayTip("公告:","      "& $Tray_ &"", "5", "1")
endif
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
_Main()                      ;跳入子线程
Func _Main()       ;子线程入口
Global $menu_01="NO1", $menu_02="NO2", $menu_03="NO3", $menu_04="NO4", $menu_05="NO5", $menu_06="NO6", $menu_07="NO7"
$Form1 = GUICreate(""& $MENU_name &"", ""& $WIDTH &"", ""& $HEIGHT &"",-1,15,$WS_CAPTION + $WS_SYSMENU + $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX);$WS_EX_ACCEPTFILES

$ListView = GUICtrlCreateListView("", "5", "74", ""& $WIDTH - 10 &"", ""& $HEIGHT - 78 &"")
GUICtrlSetResizing($ListView, "102")
_GUICtrlListView_SetView($ListView, "1")
GUICtrlSetBkColor($ListView,$Close1)

if $admin <> "pass" then                            ;判断识别是否为管理模式,并相应显示出右键菜单项
WinSetTitle($Form1, "", ""& $MENU_name &"")
$menu1 = GUICtrlCreateContextMenu($ListView)
$menu_01 = GUICtrlCreateMenuItem("运行游戏", $menu1)
$menu_02 = GUICtrlCreateMenuItem("更新游戏", $menu1)
$menu_03 = GUICtrlCreateMenuItem("游戏目录", $menu1)
$menu_08 = GUICtrlCreateMenuItem("终止更新", $menu1)
GUICtrlCreateMenuItem("", $menu1)
$devmgr = GUICtrlCreateMenuItem("管理登陆", $menu1)
$aboutitem = GUICtrlCreateMenuItem("关    于", $menu1)
elseif $admin = "pass" then
WinSetTitle($Form1, "", ""& $MENU_name &" - 管理员模式")
$menu1 = GUICtrlCreateContextMenu($ListView)
$menu_04 = GUICtrlCreateMenuItem("添加游戏", $menu1)
$menu_05 = GUICtrlCreateMenuItem("修改游戏", $menu1)
$menu_06 = GUICtrlCreateMenuItem("删除游戏", $menu1)
$menu_07 = GUICtrlCreateMenuItem("桌面图标", $menu1)
GUICtrlCreateMenuItem("", $menu1)
$menu_01 = GUICtrlCreateMenuItem("运行游戏", $menu1)
$menu_02 = GUICtrlCreateMenuItem("更新游戏", $menu1)
$menu_03 = GUICtrlCreateMenuItem("游戏目录", $menu1)
$menu_08 = GUICtrlCreateMenuItem("终止更新", $menu1)
GUICtrlCreateMenuItem("", $menu1)
$devmgr3 = GUICtrlCreateMenuItem("基本设置", $menu1)
$aboutitem = GUICtrlCreateMenuItem("关    于", $menu1)
endif
if FileExists(""& @ScriptDir &"\skin\"& $skin &"") Then            ;检测皮肤文件是否存在,存在的话就加载,皮肤文件可以走http://www.skincrafter.com/skins下载得到
_SkinGUI(""& @ScriptDir &"\menu.dat", ""& @ScriptDir &"\skin\"& $skin &"",$Form1)
dim $skin_open = "on"
else
dim $skin_open = "off"
EndIf
if $MENU_TYPE[0] >= 1 then                                           ;根据读取的配置文件显示分类按键,最多为8个分来按键
$Button1 = GUICtrlCreateButton($MENU_TYPE[1], 5, 5, 64, 64)
GUICtrlSetResizing($Button1, 802)
endif
if $MENU_TYPE[0] >= 2 then
$Button2 = GUICtrlCreateButton($MENU_TYPE[2], 78, 5, 64, 64)
GUICtrlSetResizing($Button2, 802)
endif
if $MENU_TYPE[0] >= 3 then
$Button3 = GUICtrlCreateButton($MENU_TYPE[3], 151, 5, 64, 64)
GUICtrlSetResizing($Button3, 802)
endif
if $MENU_TYPE[0] >= 4 then
$Button4 = GUICtrlCreateButton($MENU_TYPE[4], 224, 5, 64, 64)
GUICtrlSetResizing($Button4, 802)
endif
if $MENU_TYPE[0] >= 5 then
$Button5 = GUICtrlCreateButton($MENU_TYPE[5], 297, 5, 64, 64)
GUICtrlSetResizing($Button5, 802)
endif
if $MENU_TYPE[0] >= 6 then
$Button6 = GUICtrlCreateButton($MENU_TYPE[6], 370, 5, 64, 64)
GUICtrlSetResizing($Button6, 802)
endif
if $MENU_TYPE[0] >= 7 then
$Button7 = GUICtrlCreateButton($MENU_TYPE[7], 443, 5, 64, 64)
GUICtrlSetResizing($Button7, 802)
endif
if $MENU_TYPE[0] = 8 then
$Button8 = GUICtrlCreateButton($MENU_TYPE[8], 516, 5, 64, 64)
GUICtrlSetResizing($Button8, 802)
endif
$Button9 = GUICtrlCreateButton("鼠标设置", ""& $WIDTH-70 &"", "10", 65, 25)      ;附加功能按键
GUICtrlSetResizing($Button9, 804)
$Button10 = GUICtrlCreateButton("声音设置", ""& $WIDTH-70 &"", "40", 65, 25)
GUICtrlSetResizing($Button10, 804)
;$Button11 = GUICtrlCreateButton("游戏排行", ""& $WIDTH-140 &"", "10", 65, 25)

;$Button12 = GUICtrlCreateButton("游戏存档", ""& $WIDTH-140 &"", "40", 65, 25)
Global $up_ver=""& $MENU_TYPE[1] &""
Update($up_ver)
GUISetState(@SW_SHOW, $Form1)

While 1                 
$msg = GUIGetMsg()
Select

Case $msg == $GUI_EVENT_CLOSE
if $skin_open == "on" then Quit()
Exit
case $msg == $Button9
run('control.exe main.cpl')
case $msg == $Button10
run('sndvol32.exe')

case $msg == $devmgr
Global $adps = InputBox ( "管理登入", "输入管理密码:" ,"","*",200,140,-1,-1,15)         ;管理模式登陆入口
;4FB4358133E0C30239CACFABE42599D226E46F544043
if $adps==$PASS AND $PASS <> "" then
Global $admin = "pass"
GUIDelete()
if $skin_open == "on" then Quit()
_Main()
else
MsgBox(64, "错误", "密码错误!")
endif
case $msg == $aboutitem
MsgBox(64, "关于", "网管之星游戏菜单 VER1.10 "& chr(13) &"作者:QQ:171270")         ;关于信息

case $msg == $devmgr3
_setup()
case $msg == $menu_01                      ;菜单选择入口分支
Global $menu_msg="进入游戏"
_msg2($hWndLV2)
case $msg == $menu_02
Global $menu_msg="更新游戏"
_msg2($hWndLV2)
case $msg == $menu_03
Global $menu_msg="游戏目录"
_msg2($hWndLV2)
case $msg == $menu_04
Global $menu_msg="增加游戏"
_msg2($hWndLV2)
case $msg == $menu_05
Global $menu_msg="修改游戏"
_msg2($hWndLV2)
case $msg == $menu_06
Global $menu_msg="删除游戏"
_msg2($hWndLV2)
case $msg == $menu_07
Global $menu_msg="桌面图标"
_msg2($hWndLV2)
case $msg == $menu_08
Global $menu_msg="终止更新"
_msg2($hWndLV2)

case $msg == $Button1 and $Button1 <> ""          ;分类按键入口分支
Global $up_ver=$MENU_TYPE[1]
Update($up_ver)

case $msg == $Button2 and $Button2 <> ""
Global $up_ver=$MENU_TYPE[2]
Update($up_ver)

case $msg == $Button3 and $Button3 <> ""
Global $up_ver=$MENU_TYPE[3]
Update($up_ver)

case $msg == $Button4 and $Button4 <> ""
Global $up_ver=$MENU_TYPE[4]
Update($up_ver)

case $msg == $Button5 and $Button5 <> ""
Global $up_ver=$MENU_TYPE[5]
Update($up_ver)

case $msg == $Button6 and $Button6 <> ""
Global $up_ver=$MENU_TYPE[6]
Update($up_ver)

case $msg == $Button7 and $Button7 <> ""
Global $up_ver=$MENU_TYPE[7]
Update($up_ver)

case $msg == $Button8 and $Button8 <> ""
Global $up_ver=$MENU_TYPE[8]
Update($up_ver)
EndSelect
WEnd
EndFunc

Func Update($up_ver)                  ;菜单游戏图标显示空间自己建函数

_GUICtrlListView_DeleteAllItems($ListView)
$TYPE_VAR=iniread(""& @ScriptDir &"\data\config.ini", "config", ""& $up_ver &"", "")
If @error Then
MsgBox(4096, "", "打开分类数据文件错误.")
exit
Else
Global $Type__ = $TYPE_VAR
$TYPE_VAR=StringSplit(""& $TYPE_VAR &"", "|");


for $t = 1 to $TYPE_VAR[0]
GUICtrlCreateListViewItem($TYPE_VAR[$t], $ListView)
GUICtrlSetImage(-1, ""& @ScriptDir &"\data\ico\"& $TYPE_VAR[$t] &".ico", $TYPE_VAR[$t], 1)
GUICtrlSetColor(-1,$Close2)
Next
endif
EndFunc

Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)       ;检测鼠标动作事件内置函数
; $Strn=GUICtrlRead(GUICtrlRead($ListView))
; $Strnspin=StringSplit($Strn,"|")
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndLV, $tInfo
$hWndLV = GUICtrlGetHandle($ListView)
$hWndLV2 =   _GUICtrlListView_GetSelectedIndices($ListView)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndLV
Switch $iCode
Case $NM_DBLCLK
if Not $hWndLV2 <> "" then           ;得到菜单上的鼠标双击指令并进入到下面的具体行为
MsgBox(64, "系统提示", "请选择游戏.")
elseif $admin == "pass" then
MsgBox(64, "系统提示", "目前处于管理员模式,需使用鼠标右键选择操作指令。")
else
$TYPE_VAR=StringSplit(""& $Type__ &"", "|");
Global $game_name1 = $TYPE_VAR[$hWndLV2 + 1]
$data1 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "远程路径", "")
$data2 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "本地路径", "")
$data3 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "执行文件", "")
$data4 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "预先执行", "")
$data3_cmd = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "执行文件参数", "")
$data4_cmd = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "预先执行参数", "")
$data5 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "注册表", "")
$data6 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "版本号", "")
$data7 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "缓存大小", "")
_game_upopen($data1,$data2,$data3,$data4,$data5,$data6,$game_name1,$data3_cmd,$data4_cmd,$skin,$data7)
endif

;Case $NM_RCLICK          ; 鼠标右键事件

EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc

Func _game_upopen($a,$b,$c,$d,$e,$f,$g,$h,$j,$k,$L)      ;菜单的更新跳转内置函数模块
$src_ = StringRight ($a, "1")
if $src_ = "\" then $a=StringTrimRight (""& $a &"", "1")
$dst_ = StringRight ($b, "1")
if $dst_ = "\" then $b=StringTrimRight (""& $b &"", "1")
run(""& @ScriptDir &"\Load.exe "& chr(34) &"|"& $a &"|"& $b &"|"& $c &"|"& $d &"|"& $e &"|"& $f &"|"& $g &"|"& $h &"|"& $j &"|"& $k &"|"& $L &"|"& chr(34) &"", "")
EndFunc

Func _game_open($a,$b,$c,$d,$e,$f,$g,$h,$j)      ;直接进入游戏的内置函数模块
if $d <> "" then
Run(""& $d &"", "")
elseif $d <> "" and $j <> "" then
Run(""& $d &" "& $j &"", "")
endif

if $e <> "" then
runwait("regedit.exe /s "& chr(34) & $e & chr(34) &"", "", @SW_HIDE)
endif
if NOT FileExists(""& $c &"") Then
MsgBox(16, "Error", "程序无法执行,请联系管理员!")
else
if $h <> "" and $c <> "" then
Run(""& $c &" "& $h &"", ""& $b &"")
elseif $c <> "" then
Run(""& $c &"", ""& $b &"")
endif
endif
EndFunc
Func _game_path($a,$b,$c,$d,$e,$f,$g,$h,$j)
Run(""& @windowsdir &"\explorer.exe "& $b &"", ""& $b &"")
EndFunc

Func _msg2($hWndLV2)                       ;各种菜单的事件信息识别内置函数,作用为正确的交通指令
if $hWndLV2 <> "" then
$TYPE_VAR=StringSplit(""& $Type__ &"", "|");
Global $game_name1 = $TYPE_VAR[$hWndLV2 + 1]
$data1 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "远程路径", "")
$data2 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "本地路径", "")
$data3 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "执行文件", "")
$data4 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "预先执行", "")
$data3_cmd = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "执行文件参数", "")
$data4_cmd = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "预先执行参数", "")
$data5 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "注册表", "")
$data6 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "版本号", "")
$data7 = iniread(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"", "缓存大小", "")
endif
if Not $hWndLV2 <> "" and $menu_msg <> "增加游戏" and $menu_msg <> "终止更新" then                    ;下面几处为菜单的指令识别及指令进入交通
MsgBox(64, "系统提示", "请选择游戏.")
elseif $menu_msg == "进入游戏" then
_game_open($data1,$data2,$data3,$data4,$data5,$data6,$game_name1,$data3_cmd,$data4_cmd)
elseif $menu_msg == "更新游戏" then
_game_upopen($data1,$data2,$data3,$data4,$data5,$data6,$game_name1,$data3_cmd,$data4_cmd,$skin,$data7)
elseif $menu_msg == "游戏目录" then
_game_path($data1,$data2,$data3,$data4,$data5,$data6,$game_name1,$data3_cmd,$data4_cmd)
elseif $menu_msg == "桌面图标" then
$src_ = StringRight ($data1, 1)
if $src_ = "\" then $data1=StringTrimRight (""& $data1 &"", 1)
$dst_ = StringRight ($data2, 1)
if $dst_ = "\" then $data2=StringTrimRight (""& $data2 &"", 1)
FileCreateShortcut(""& @ScriptDir &"\Load.exe", ""& @DesktopDir &"\"& $game_name1 &"", ""& @ScriptDir &"", ""& chr(34) &"|"& $data1 &"|"& $data2 &"|"& $data3 &"|"& $data4 &"|"& $data5 &"|"& $data6 &"|"& $game_name1 &"|"& $data3_cmd &"|"& $data4_cmd &"|"& $skin &"|"& $data7 &"|"& chr(34) &"", ""& $game_name1 &"", ""& @ScriptDir &"\data\ico\"& $game_name1 &".ico", "", "", "")
MsgBox(64, "系统提示", ""& $game_name1 &"的快捷方式成功建立到桌面!")
elseif $menu_msg == "终止更新" then
If ProcessExists("Load.exe") Then
ProcessClose("Load.exe")
else
MsgBox(64, "系统提示", "没有发现有更新任务存在!")
endif
elseif $menu_msg == "增加游戏" then
Global $FileOpen1 = ""
Global $FileOpen1 = FileOpenDialog("游戏执行文件", ""& @DesktopDir &"", "游戏启动文件(*.exe;*.cmd;*.bat;*.VBS;*.URL)", "1+ 2", "游戏启动文件")
If Not @error Then
$file_name = StringSplit($FileOpen1,"\")
$file_name1 = ""& StringTrimRight($file_name,StringLen($file_name[$file_name[0]])) &""
$game_name1 = ""& $file_name[$file_name[0]-1] &""

Global $dst_n =""
for $xyz = 1 to $file_name[0]-1
$dst_n = ""& $dst_n & $file_name[$xyz] &"\"
Next
Global $df = 1
_game_dat(""& $Ndst & $game_name1 &"\", $dst_n, $FileOpen1, "", "", "", $up_ver, $game_name1, $df,$CMD1,$CMD2,$data7)
Update($up_ver)

endif

elseif $menu_msg == "修改游戏" then


Global $df = 2
_game_dat($data1, $data2, $data3, $data4, $data5, $data6, $up_ver, $game_name1, $df,$data3_cmd,$data4_cmd,$data7)

Update($up_ver)
elseif $menu_msg == "删除游戏" then
$TYPE_VAR=StringSplit(""& $Type__ &"", "|");
Global $game_name1 = $TYPE_VAR[$hWndLV2 + 1]
$TYPE_VAR2=StringSplit(""& $Type__ &"", "|");
_ArrayDelete($TYPE_VAR2, $hWndLV2 + 1)
_ArrayDelete($TYPE_VAR2, 0)
Dim $sArrayString = _ArrayToString($TYPE_VAR2, "|", 0, "|")

IniWrite(""& @ScriptDir &"\data\config.ini", "config", ""& $up_ver &"", ""& $sArrayString &"")
IniDelete(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"")
FileDelete(""& @ScriptDir &"\data\ico\"& $game_name1 &".ico")
Update($up_ver)
endif
Global $menu_msg="del"
EndFunc


Func _game_dat($a, $b, $c, $d, $e, $f, $up_ver, $game_name1, $df,$CMD1,$CMD2,$data7)         ;增加游戏及修改游戏时的程序操作模块函数

$Form3 = GUICreate("游戏设置", 320,300, -1, -1, -1)
$nae_data = GUICtrlCreateInput (""& $game_name1 &"", 80, 15, 170, 20)
$dst_data = GUICtrlCreateInput (""& $b &"", 80, 45, 170, 20)
$src_data = GUICtrlCreateInput (""& $a &"", 80, 75, 230, 20)
$run_data = GUICtrlCreateInput (""& $c &"", 80, 105, 140, 20)
$run_CMD = GUICtrlCreateInput (""& $CMD1 &"", 250, 105, 60, 20)
$run1_data = GUICtrlCreateInput (""& $d &"", 80, 135, 140, 20)
$run1_CMD = GUICtrlCreateInput (""& $CMD2 &"", 250, 135, 60, 20)
$reg_data = GUICtrlCreateInput (""& $e &"", 80, 165, 230, 20)
$ver_data = GUICtrlCreateInput (""& $f &"", 80, 195, 170, 20)

$slider1 = GUICtrlCreateSlider (80,225,170,20)
GUICtrlSetLimit(-1,18,1)   ; 修改最小值/最大值
GUICtrlSetData($slider1,$data7 / 512) ; 设置滑块的初始位置
Global $Progress1Text = GUICtrlCreateLabel("", 265, 230, 60, 12)
Global $test=0

GUICtrlCreateLabel ("游戏名称:",10,15,70,25)
GUICtrlCreateLabel ("本地路径:",10,45,70,25)
GUICtrlCreateLabel ("远程路径:",10,75,70,25)
GUICtrlCreateLabel ("执行文件:",10,105,70,25)
GUICtrlCreateLabel ("CMD:",225,105,22,25)
GUICtrlCreateLabel ("预先执行:",10,135,70,25)
GUICtrlCreateLabel ("CMD:",225,135,22,25)
GUICtrlCreateLabel ("注 册 表:",10,165,70,25)
GUICtrlCreateLabel ("版 本 号:",10,195,70,25)
GUICtrlCreateLabel ("更新缓存:",10,225,70,25)

$fixver = GUICtrlCreateButton ("刷新", 260, 195, 50, 22)


$fixico = GUICtrlCreateButton("", 255, 15, 50, 50, $BS_ICON)
GUICtrlSetImage($fixico, ""& @ScriptDir &"\data\ico\"& $game_name1 &".ico", 1)


$btn1 = GUICtrlCreateButton ("确定提交", 80, 260, 70, 25)
$btn2 = GUICtrlCreateButton ("取消退出", 190, 260, 70, 25)

GUISetState()
$nametest = IniReadSection(""& @ScriptDir &"\data\"& $up_ver &".ini", ""& $game_name1 &"")
If not @error and $df = 1 Then GUICtrlSetData(""& $nae_data &"", ""& $game_name1 &"(2)")
if $df == "1" then GUICtrlSetData(""& $ver_data &"", ""& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC &"")
While 1

$game_dat_msg = GUIGetMsg()
Select
Case $game_dat_msg = $GUI_EVENT_CLOSE or $game_dat_msg = $btn2
ExitLoop
    Case GUICtrlRead($slider1) = "1" and $test <> "1"
   GUICtrlSetData($Progress1Text, ""& 0.5 * 1024 &"KB")
   Global $test = 1
    Case GUICtrlRead($slider1) = "2" and $test <> "2"
   GUICtrlSetData($Progress1Text, ""& 1 * 1024 &"KB")
      Global $test = 2
    Case GUICtrlRead($slider1) = "3" and $test <> "3"
   GUICtrlSetData($Progress1Text, ""& 1.5 * 1024 &"KB")
      Global $test = 3
    Case GUICtrlRead($slider1) = "4" and $test <> "4"
   GUICtrlSetData($Progress1Text, ""& 2 * 1024 &"KB")
      Global $test = 4
    Case GUICtrlRead($slider1) = "5" and $test <> "5"
   GUICtrlSetData($Progress1Text, ""& 2.5 * 1024 &"KB")
      Global $test = 5
    Case GUICtrlRead($slider1) = "6" and $test <> "6"
   GUICtrlSetData($Progress1Text, ""& 3 * 1024 &"KB")
      Global $test = 6
    Case GUICtrlRead($slider1) = "7" and $test <> "7"
   GUICtrlSetData($Progress1Text, ""& 3.5 * 1024 &"KB")
      Global $test = 7
    Case GUICtrlRead($slider1) = "8" and $test <> "8"
   GUICtrlSetData($Progress1Text, ""& 4 * 1024 &"KB")
      Global $test = 8
    Case GUICtrlRead($slider1) = "9" and $test <> "9"
   GUICtrlSetData($Progress1Text, ""& 4.5 * 1024 &"KB")
      Global $test = 9
          Case GUICtrlRead($slider1) = "10" and $test <> "10"
   GUICtrlSetData($Progress1Text, ""& 5 * 1024 &"KB")
      Global $test = 10
          Case GUICtrlRead($slider1) = "11" and $test <> "11"
   GUICtrlSetData($Progress1Text, ""& 5.5 * 1024 &"KB")
      Global $test = 11
          Case GUICtrlRead($slider1) = "12" and $test <> "12"
   GUICtrlSetData($Progress1Text, ""& 6 * 1024 &"KB")
      Global $test = 12
          Case GUICtrlRead($slider1) = "13" and $test <> "13"
   GUICtrlSetData($Progress1Text, ""& 6.5 * 1024 &"KB")
      Global $test = 13
          Case GUICtrlRead($slider1) = "14" and $test <> "14"
   GUICtrlSetData($Progress1Text, ""& 7 * 1024 &"KB")
      Global $test = 14
          Case GUICtrlRead($slider1) = "15" and $test <> "15"
   GUICtrlSetData($Progress1Text, ""& 7.5 * 1024 &"KB")
      Global $test = 15
          Case GUICtrlRead($slider1) = "16" and $test <> "16"
   GUICtrlSetData($Progress1Text, ""& 8 * 1024 &"KB")
      Global $test = 16
          Case GUICtrlRead($slider1) = "17" and $test <> "17"
   GUICtrlSetData($Progress1Text, ""& 8.5 * 1024 &"KB")
      Global $test = 17
      Case GUICtrlRead($slider1) = "18" and $test <> "18"
   GUICtrlSetData($Progress1Text, ""& 9 * 1024 &"KB")
      Global $test = 18    
Case $game_dat_msg = $fixver
GUICtrlSetData(""& $ver_data &"", ""& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC &"")
Case $game_dat_msg = $fixico
Global $FileOpen = ""
Global $FileOpen = FileOpenDialog("图标文件", ""& @DesktopDir &"", "游戏图标(*.exe;*.ico)","1+2", "图标