#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('GUIOnEventMode', 1)
Local $var = IniReadSection("C:\log\config.ini", "Item")
$fGUI = GUICreate("test", 600, 400)
GUISetOnEvent(-3, 'MYGUI_EVENT')
GUISetState()
$cGUI = GUICreate("", 550, 320, 25, 50, $WS_BORDER + $WS_CHILD, "", $fGUI)
Local $cGUI_W = 550, $cGUI_H = 320
GUISetOnEvent(-3, 'MYGUI_EVENT')
Local $Y = 0, $D = 32
For $i = 1 To $var[0][0]
GUICtrlCreateLabel($var[$i][0], 20, $Y + 10)
$var[$i][0] = GUICtrlCreateButton($var[$i][0], 360, $Y + 5, 150, 22)
GUICtrlSetOnEvent(-1, 'MYGUI_EVENT')
GUICtrlCreateLabel("", 0, $Y + $D, $cGUI_W, 1) ;分隔线
GUICtrlSetBkColor(-1, 0xdcdcdc)
$Y += $D
Next
GUISetState()
GUICtrlSetOnEvent(-7, "MYGUI_EVENT")
While 1
Sleep(10)
WEnd
Func MYGUI_EVENT()
For $i = 1 To $var[0][0]
Switch @GUI_CtrlId
Case - 3
Exit
Case $var[$i][0]
MsgBox(0, "", $var[$i][1])
EndSwitch
Next
EndFunc ;==>MYGUI_EVENT
config.ini
[Item]
中文=F:\USB\33\aa\test.exe
gui=F:\USB\33\aa\gui.exe
QQ音乐=D:\Tencent\QQMusic\1111.2014.9.13.15.58.35\QQMusic.exe
123324=4568686 |