#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\work\脚本\终端脚本\me\快速启动\form1.kxf
Dim $Button[20],$i,$x,$y,$j=1,$qdname,$var,$path1,$path2,$path3,$var1,$m
$path1=@ScriptDir&"\启动工具.ini"
$path2=@ScriptDir&"\启动文件.ini"
$path3=@ScriptDir&"\sys.ini"
$Form1_1 = GUICreate("tfire快速启动", 234, 363, 188, 124)
$Tab1 = GUICtrlCreateTab(8, 48, 217, 297)
$TabSheet1 = GUICtrlCreateTabItem("常用工具")
$Group1 = GUICtrlCreateGroup("", 16, 88, 201, 249)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem("常用文件")
$Group2 = GUICtrlCreateGroup("", 16, 88, 201, 249)
;$Button2 = GUICtrlCreateButton("添加", 24, 104, 42, 42)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateTabItem("")
$i=IniRead($path3,"qdxiang","xmshu","-1")
$x=IniRead($path3,"fristwz","x","-1")
$y=IniRead($path3,"fristwz","y","-1")
While $j<=$i
$qdname=IniRead($path1,"qdname","qd"&$j,"-1")
$Button[$i] = GUICtrlCreateButton($qdname, $x, $y, 42, 42)
$j=$j+1
WEnd
$x=$x+48
IniWrite($path3,"endwz","x",$x)
IniWrite($path3,"endwz","y",$y)
IniWrite($path3,"endwz","j",$j)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button[1]
$var = FileOpenDialog("选择一个文件",".", "所有文件(*.*)", 1)
IniWrite($path1,"workpath","path"&$j,$var)
$var1=StringSplit($var,'\',1)
$m=$var1[0]
$i=IniRead($path3,"endwz","j","-1")
$x=IniRead($path3,"endwz","x","-1")
$y=IniRead($path3,"endwz","y","-1")
IniWrite($path1,"workpath","path"&$i,$var)
IniWrite($path1,"qdname","qd"&$i,$var1[$m])
$Button[$i] = GUICtrlCreateButton($var1[$m], $x, $y, 42, 42)
Case $Button[2]
;$var=IniRead($path1,"workpath","path2","-1")
MsgBox(4096,"",$var)
;Run($var)
EndSwitch
WEnd
执行后,马上出现msgbox(4096,"",$var)为什么